Learn
Next, we need to ask the user for input.
name = raw_input("What's your name?") print name
In the above example, raw_input()
accepts a string, prints it, and then waits for the user to type something and press Enter (or Return).
In the interpreter, Python will ask:
What's your name?
Once you type in your name and hit Enter, it will be stored in name
.
Instructions
1.
On line 4, use raw_input("Enter a word: ")
to ask the user to enter a word. Save the results of raw_input()
in a variable called original
.
Click Run
Type a word in the console window and press Enter (or Return).
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.