- 3

Please give me answer

3rd May 2022, 2:01 AM
Onkar Tikkal
Onkar Tikkal - avatar
3 Respostas
+ 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)
3rd May 2022, 3:46 AM
Fꫀⲅძ᥆͟ᥙ᥉᯽
Fꫀⲅძ᥆͟ᥙ᥉᯽ - avatar
+ 4
The answer can be found in the Code Playground if you will type in your code there and then press Run.
3rd May 2022, 3:12 AM
Brian
Brian - avatar
+ 1
Jay Matthews 🤣👍
3rd May 2022, 9:42 AM
Rik Wittkopp
Rik Wittkopp - avatar