0
How can I make multiplication table of any number in python?
I want some example in form of codes if possible.
2 Respostas
+ 1
num=int(input('Enter any number \n'))
for i in range(1,10):
print('%d x %d = %d'%(i,num,i*num))
- 1
Another option:
print('Type a number: ')
user_input = input()
for i in range(1,11):
print(str(user_input) + ' x ' + str(i) + ' = ' + str(int(user_input) * i))