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?

1/29/2020 7:33:24 PM

Chris Selle

3 Answers

New Answer


Simply by word = input()


After the ":" type "\n". "\n" moves the cursor to the next line


"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.