what is an input function

  • the input function is ised to recieve input from the user, and then allows you to prompt the user for input which is then trned into a string. You must assign it to a variable and then the input will be stoeed as a strong in the variable
#ask the user their age, store using the variable 'name'
name=input('What is your name? ')

#display the name or input for the user to see as a greeting
print('Hello '+ name + '!!')
What is your name?  sharon


Hello sharon!!