Professional Documents
Culture Documents
03 Python Interaction
03 Python Interaction
1
Welcome Python Programming E&ICT IIT Kanpur
Interacting with Python Programs
• Python program communicates its results
to user using print
prutor.ai
• Most useful programs require information
from users
– Name and age for a travel reservation system
• Python 3 uses input to read user input as a
string (str)
2
Oct-16 Programming E&ICT IIT Kanpur
input
• Take as argument a string to print as a
prompt
• Returns the user typed value as a string
IN[1]:
prutor.ai
– details of how to process user string later
IN[2]: ( )
IN[3]:
IN[1]:
prutor.ai
– details of how to process user string later
IN[2]: ( )
IN[3]: