Header Ads

Python - WAP to Print Math Tables using Python - 16

This is a Python Code to Print the Math Tables of any given Number using Python.

Source Code:

#!/usr/bin/Python3

while True:

    num = int(input("\n Enter a Number : "))

    print ()
    for idx in range(1, 11):
        mul = num * idx
        print (" %d x %d = %d" % (num, idx, mul))

    print ("\n - CodeGig.org")    
    if (input(" To Continue 'y' : ") == 'y'):
        continue
    else:
        break

Program Output: 

No comments