write a python program to print multiplication table of 4
Answers
Answered by
0
Answer:
x = int(input("Enter the number you want multiplication table of"))
for i in range(1,11):
print(str(x) + " x " + str(i) + " = " + str(x * i))
Explanation:
input( ) is used to take input as string
str( ) is used to convert the int value to string (make sure to store it if you are not directly printing it)
Answered by
1
Answer:
Here's a one liner for you :)
Explanation:
print(*[f'4 × {i} = {i * 4}' for i in range(1, 10)], sep = '\n')
Similar questions