How do you add a variable in quotation marks? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you add a variable in quotation marks?

I want to make the code ask, What is your name. It will save the answer in a variable then say, so you call yourself ‘(the variable)’ huh? I dont know how to add the variable in quotation marks.

27th Mar 2019, 10:15 AM
Yannis Ho
Yannis Ho - avatar
1 Answer
+ 2
print('Your name is"' + name +'".')
27th Mar 2019, 10:20 AM
Niush
Niush - avatar