How do you make Python ask a question (input function)?

1) The "Input" function in Python does this. It allows you to ask a question and for the person running the program to type the answer and hit "Enter" on the keyboard to respond. Inside the input you type the question in quotes.

*Note that inputs usually are inside variables

2) The input doesnt do anything unless you take the variable and do something with it. See the next step for guidance.

3) In this example I have taken the input (stored inside the name variable) and told Python to print the message "Hi [name you typed], I love that name! This is just one of infinite examples for using an input.

© 2020 Farragut Technology Program