+ 1

from tutorial Python 3 quiz: Input function

word = input("enter a word: ") print(word + " shop") When prompted I enter: cheese My output is then "Enter a word: Cheese shop", am I missing something or why is the answer and all other comments showing only 'Cheese shop', how did 'Enter a word:' get dropped?

29th Jan 2020, 7:33 PM
Chris Selle
Chris Selle - avatar
3 Answers
+ 2
Simply by word = input()
29th Jan 2020, 7:41 PM
Oma Falk
Oma Falk - avatar
0
After the ":" type "\n". "\n" moves the cursor to the next line
29th Jan 2020, 7:36 PM
Odyel
Odyel - avatar
0
"Enter a word” is the instruction that your program gives to readers. You can see that it’s an instruction because it is inside the () after input. If you follow this instruction and enter “cheese”, then this becomes the value assigned to “word”. Now word is equal to cheese, so word+shop becomes cheese+shop.
29th Jan 2020, 10:10 PM
Isabel
Isabel - avatar