I was writing a program to write the multiplication table of number given by the user. Here's my code:
def mul_table(n):
for i in range(1,11):
print(n,"x",i,"=",(n * i))
i = i + 1
return(n)
x = int(input("Enter the number: "))
x1 = mul_table(x)
print(x1)
But in the output it shows the number entered by the user also in the end like this (I know have written the value after "return" but if I leave it empty then it shows None, so how can I get rid of this?):
Enter the number: 5
5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50
**5**
Can anyone tell me that how can the program return nothing (absolutely nothing, not even the "None" text or the number entered by the user) in PYTHON 3.9.1 ?