Lesson 4

Introducing Input


The ‘input()’ function takes data from the keyboard, and introduces it into our program as a string. Anything that you put inside of the parenthesis gets printed out as a prompt for the user.

On line 12, we will be setting up an input that will ask for the users name. Add the code ‘myName= input(“insert your name: “)’ Make sure to place a space after the semi colon, so that the text does not smush together

On Line 13, we will incorporate this input into a print function. Add the code ‘print(“Hello, my name is ” + myName)’ Again make sure to add in spaces where appropriate, to make sure that there is space between the words in our output