+ 1

How to print first five multiples of a number

22nd Jul 2018, 8:15 AM
Hrishi Gothe
Hrishi Gothe - avatar
3 Réponses
+ 3
for i in range(1,6): print(num*i)
22nd Jul 2018, 8:16 AM
Satyam
+ 2
Seb TheS multiples!
22nd Jul 2018, 9:36 AM
Satyam
+ 1
num = 2 print(str(num) * 5) result: 22222 num = 3 print((str(num) + " ") * 5) result: 3 3 3 3 3
22nd Jul 2018, 9:27 AM
Seb TheS
Seb TheS - avatar