Professional Documents
Culture Documents
Part 2 :
Input and if statements
Python allows for user input and gets data from the console
• Python 3.6 using input() method
• Python 2.7 using raw_input() method
Python stops executing the program when the program comes to the input function, it will continue after the user iput
2
Lecture 2 – Part 2
• Python 3.6 using input() method input() method is used in this module
3
Lecture 2 – Part 2
1
User input the value
3
4
Lecture 2 – Part 2
2
The program received the user input
3 5
Lecture 2 – Part 2
3 7
Lecture 2 – Part 2