Below is the code to print multiplication table
# print multiplication table
num=int(input("Enter a number to display its multiplication table:"))
r=int(input("Enter upto which value do you want to print:"))
for i in range(1,r+1):
print(num,"*",i,"=",num*i)
Output:
Enter a number to display its multiplication table:5
Enter upto which value do you want to print:6
5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30