- 3
Please give me answer
3 Answers
+ 8
print (3*'7')
Output: 777
==========
Here '7' is not a number! Surprised, isn't it? When you have something (even if it's a number) in a signle or duoble quotation, the program takes it as a string.
Here 7 in is in single quotation. So it's not number. It's a string. So the output of 3*'7' is = 777 (printing 7 three times)
*But 3*7 = 21 (Here 7 is a number)
+ 4
The answer can be found in the Code Playground if you will type in your code there and then press Run.
+ 1
Jay Matthews
đ€Łđ