Hi
Instead of getting e.g.
5 x 1 = 5
5 x 2 = 10 etc ...
I get:
5 x 1 = 5
5 x 2 = 55
5 x 3 = 555 etc ...
i=1
num = input("Input number: ")
while i<=10:
res = num * i
print(f"{num} x {i} = {res}")
i+=1
Thanks
V
Hi
Instead of getting e.g.
5 x 1 = 5
5 x 2 = 10 etc ...
I get:
5 x 1 = 5
5 x 2 = 55
5 x 3 = 555 etc ...
i=1
num = input("Input number: ")
while i<=10:
res = num * i
print(f"{num} x {i} = {res}")
i+=1
Thanks
V
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Valerie MeunierRank #1,526 · 1K reputationPosted Mar 21, 2023, 7:36 AM EDT
I found it:
num = int(input("Input number: "))