Field of Technological Industries: Computer Science (ETP211) : (Lec4)
Field of Technological Industries: Computer Science (ETP211) : (Lec4)
• Custom-made
© McGraw-Hill Education 2
Six-Step Software Development Life Cycle
• Selection structure
• A decision must be made
C++ Extends C to use objects or program modules that can be reused and
interchanged between programs
C# A programming language designed by Microsoft to extend C++ for
developing applications in the Windows environment
Java Primarily used for Internet applications; similar to C++; runs with a
variety of operating systems
JavaScript Embedded into web pages to provide dynamic and interactive content
Levels or Generations
• Coding from machine languages to human or natural
languages
There are five distinct generations
• Lower level is closer to machine language
• Higher level is closer to human-like language
© McGraw-Hill Education 11
Five Generations
© McGraw-Hill Education 12
Generation Samples
Used by:
• Google, Yahoo!, Youtube
• Many Linux distributions
• Games and apps (e.g. Eve Online)
© McGraw-Hill Education
Installing Python
Windows: Mac OS X:
Download Python from Python is already installed.
http://www.python.org Open a terminal and run python or
Install Python. run Idle from Finder.
Run Idle from the Start Menu.
Linux:
Chances are you already have
Python installed. To check, run
python from the terminal.
If not, install from your distribution's
package system.
© McGraw-Hill Education
Interpreted Languages
interpreted
• Not compiled like Java
• Code is written and then directly executed by an interpreter
• Type commands into interpreter and see immediate results
Java: Runtime
Code Compiler Computer
Environment
© McGraw-Hill Education
The Python Interpreter
© McGraw-Hill Education
Our First Python Program
hello.py
1 print("Hello, world!")
© McGraw-Hill Education
The print Statement
print("text")
print() (a blank line)
© McGraw-Hill Education
Comments
Syntax:
# comment text (one line)
swallows2.py
1 # Suzy Student, CSE 142, Fall 2097
2 # This program prints important messages.
3 print("Hello, world!")
4 print() # blank line
5 print("Suppose two swallows \"carry\" it
6 together.")
print('African or "European" swallows?')
© McGraw-Hill Education
Questions?