How can i make this code work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i make this code work?

name = input('What is your name? ') favorite_color = input('What is your favorite color? ') print(name + 'Likes' + favorite_color) This code has a error and i Don't know what it is, i thought i did everything correctly...

9th Oct 2019, 2:45 PM
Shadow Spirit
Shadow Spirit - avatar
4 Answers
+ 2
Prompt: _________________________ Jack Red ------------------------------------------ End prompt Type in the first input then press the enter button to go to the next line then put your second input then submit. SoloLearn can't give more than one input prompt Also put spaces around Likes
9th Oct 2019, 3:15 PM
Odyel
Odyel - avatar
+ 1
Hi. Everything works. You must write text in the separated lines.
9th Oct 2019, 2:53 PM
Dmytro Novak
Dmytro Novak - avatar
0
Thanks can i have a example?
9th Oct 2019, 3:06 PM
Shadow Spirit
Shadow Spirit - avatar
0
So like a example of how i could make this work?
9th Oct 2019, 3:17 PM
Shadow Spirit
Shadow Spirit - avatar