cs 101 – oct. 12

5
CS 101 – Oct. 12 • Software problem solving – Process – Languages • Python language

Upload: clarke-newman

Post on 30-Dec-2015

21 views

Category:

Documents


2 download

DESCRIPTION

CS 101 – Oct. 12. Software problem solving Process Languages Python language. Process. The usual procedure for writing a program from scratch involves these steps: Read & understand the problem Explain how to solve the problem in English. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 101 – Oct. 12

CS 101 – Oct. 12

• Software problem solving – Process– Languages

• Python language

Page 2: CS 101 – Oct. 12

Process

• The usual procedure for writing a program from scratch involves these steps:– Read & understand the problem

– Explain how to solve the problem in English.

– Write solution in the desired programming language

– Compile the program• Some languages are interpreted rather than compiled.

– Run the program, check the output.

Page 3: CS 101 – Oct. 12

Some languages

• Machine languages

• Assembly languages

• High-level languages– FORTRAN (1957)– Pascal– C and C++– Java– Javascript and Python

Page 4: CS 101 – Oct. 12

Python

• Guido van Rossum, CWI, 1991• High-level and multi-purpose • One of the easiest languages to learn• Used by Google & CG animation studios

– Python is often efficient when working with huge amounts of text/numerical data

• Many built-in functions to simplify our work

Page 5: CS 101 – Oct. 12

Practical stuff

• To develop our Python solutions, we’ll use a free software package called ActivePython 2.6– Allows us to edit and run programs

– You’ll see 2 windows: one for editing the code, and other for running the program

• Python file name ends in .py• What is a program?

– Set of statements: performing operations on variables

– Let’s see how to do… input, calculations, output