How to get numerical value in the following? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to get numerical value in the following?

y=5 print('y'*3)

11th Dec 2017, 12:48 PM
S Sh
S Sh - avatar
7 Answers
+ 1
y=str(5) print(y*3)
11th Dec 2017, 1:22 PM
Ahmed Mohammed Ahmed Khodary
Ahmed Mohammed Ahmed Khodary - avatar
+ 1
thanx incredible
11th Dec 2017, 1:27 PM
S Sh
S Sh - avatar
0
output in that case=15 but I want 555
11th Dec 2017, 12:54 PM
S Sh
S Sh - avatar
0
No problem james
11th Dec 2017, 1:35 PM
S Sh
S Sh - avatar
11th Dec 2017, 1:37 PM
S Sh
S Sh - avatar
0
is it possible to get str value and numerical value in same code??
11th Dec 2017, 1:38 PM
S Sh
S Sh - avatar
0
thanx it worked
11th Dec 2017, 1:59 PM
S Sh
S Sh - avatar