Input and Output
• To prompt the user for some information? Use the
• The input function always returns a string (
>>> answer = input("What is your name? ")
What is your name? I... I do not know that.
'I... I do not know that.'
• Use the
print() function to display output to the user
>>> qty = 2
>>> print("I have", qty, "coconuts")
'I have 2 coconuts'