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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Valerie MeunierPosted Mar 21, 2023, 11:36 AM
I found it:
num = int(input("Input number: "))