0
My question is about python?
c = "moon" b = "that" a = "honey" print(c + a) is my for this code will run this code or not?
7 Answers
+ 4
Your code will print "moonhoney" to the console because string concatenation occurred.
+ 3
Hi! You can check this by running your code in the coding section. (Code playground)
In the app, visit the Code Playground </> section using the navbar at the top. Otherwise just follow this link:
https://code.sololearn.com/
When in there, you will see a green (or any other theme specific color) circular button at the bottom right with a plus sign at the center. Tap on it. Choose the language.
https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app
0
Be careful to give space or tabe in the print line otherwise there no problem
0
The code will output "moonhoney" because when you add strings, they just combine ..
0
Yes moonhoney
0
Yes your code will run. All your variables are of the same data type, that is all of them are STRINGS. What you have done is what is called CONCATENATION.
0
Yes â
your code will run.
It defines three strings and prints them:
c = "moon"
b = "that"
a = "honey"
print(c + a)
Output:
moonhoney
đ Note: thereâs no space between them. If you want a space:
print(c + " " + a) # moon honey