Professional Documents
Culture Documents
02 Python Programming Cycle
02 Python Programming Cycle
1
Python Programming E&ICT IIT Kanpur
The Programming Cycle for Python
prutor.ai
2
Programming E&ICT IIT Kanpur
Run
with some input
Write/Edit
prutor.ai
OK?
NO
YES
YES
More
Inputs?
NO
3
Programming E&ICT IIT Kanpur
The Programming Cycle for Python
1. Write your program or edit (i.e., change
or modify) your program.
prutor.ai
2. Run your program on an input.
– Python is an interpreted language (unlike C,
C++, Java). There is no separate compilation
step.
3. If output is not correct, return to editing
step.
4. Repeat step 2,3 for other inputs, if any.
4
Programming E&ICT IIT Kanpur
An IDE for Python
• In this course, we recommend that you use
Spyder: an Integrated Development
prutor.ai
Environment (IDE) for Python.
• Spyder consists of
– Python shell (iPython)
– Editor
– Debugger (Object Inspector)
5
Programming E&ICT IIT Kanpur
Toolbar
Debugger/
Inspector
Editor
prutor.ai
iPython Shell
IN[3]:
IN[4]:
prutor.ai
( )
IN[4]:
prutor.ai
(
(Statements)
Outputs