Input Statements

Input statements are used when you want the user to input information for you to analyze using code.

In the case of our text adventure game, we will use input statements to take in the user's choice and proceed accordingly.

Input statements are written as followed:

print("Text")

x = input()

print("Text, " + x)

*When writing code, you can code variables and text anywhere in your code as long as you use quotations in the right place.

I would now like you to use the format above to ask for the user's name and print it out.

If you need help, feel free to ask.

Last updated