+ 2

I'm newbie in learning python but I don't know how the code works, after coding the outputs is confusing. It only print the name

name = input("what is your name? ") favorite_color = input("what is your favorite color? ") print(name+" like "+favorite_color)

25th Jun 2022, 3:51 PM
MAnny
MAnny - avatar
6 Answers
+ 6
You barely made any progress yet in "Python for Beginners". Try to complete the course first then see what happens.
25th Jun 2022, 4:05 PM
Ipang
+ 4
if you need help, please state the issue as specific as possible so we can understand what you are referring to. Link a code example and mention which aspect confuses you.
25th Jun 2022, 4:05 PM
Lisa
Lisa - avatar
+ 3
Ipang thank you, I will do that and see what happens
25th Jun 2022, 4:07 PM
MAnny
MAnny - avatar
+ 3
Ipang name = input("what is your name? ") favorite_color = input("what is your favorite color? ") print(name+" like "+favorite_color) The outcome is confusing, I need help.
25th Jun 2022, 5:42 PM
MAnny
MAnny - avatar
+ 1
Manny, In SoloLearn we only get one chance for providing inputs necessary for our program to run. Therefore for that code which require 2 inputs, when input dialog. comes up, enter the name at first line, and favourite colour at second line, for example ipang silver Then hit the submit button. Here's an intro code on how SoloLearn Playground input works https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
26th Jun 2022, 4:24 AM
Ipang
0
You can use , instead of +
27th Jun 2022, 8:24 AM
Hossein_Hejazi
Hossein_Hejazi - avatar