Display ant Table Input by the User in Python
n=int(input("Enter any Number "))
for i in range(1,11):
print('{0} * {1} = {2}'.format(n,i,i*n))
Output :
Enter any Number : 4 4 * 1 = 4 4 * 2 = 8 4 * 3 = 12 4 * 4 = 16 4 * 5 = 20 4 * 6 = 24 4 * 7 = 28 4 * 8 = 32 4 * 9 = 36 4 * 10 = 40



0 comments:
Post a Comment
gurnoorsingh5974@gmail.com