Please what's the answer to this. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Please what's the answer to this.

"5"*4

21st Sep 2021, 11:55 PM
Victor apara
3 Answers
+ 3
If there was a print() around it then it would output 5555, because when putting parentheses around the 5 you turn it into a string then multiply the string by the integer 4 so you get 5555.
22nd Sep 2021, 12:31 AM
Elliot
Elliot - avatar
+ 5
5555
22nd Sep 2021, 12:30 AM
Jofay
Jofay - avatar
+ 3
Alright now I get it.
22nd Sep 2021, 12:32 AM
Victor apara