To print any multiplication table
a = int(input('enter the number'))
b = int(input('enter the range'))
for i in range(1, b + 1):
print(str(i) + " X " + str(a) + " = " + str(int(i * a)))
else:
print("copleted")
a = int(input('enter the number'))
b = int(input('enter the range'))
for i in range(1, b + 1):
print(str(i) + " X " + str(a) + " = " + str(int(i * a)))
else:
print("copleted")
to make star pattern
row = int(input("Enter no of rows : "))
a="*"
stars_count = 1
while row > 0:
print(" "*row + a * stars_count)
row =row-1
stars_count =stars_count+ 1
row = int(input("Enter no of rows : "))
a="*"
stars_count = 1
while row > 0:
print(" "*row + a * stars_count)
row =row-1
stars_count =stars_count+ 1
result
* *
* * *
* * * *
* * * * *
For printing numbers from 0 to 100 as multiples of 10
for x in range (0,100,10):
print (x)
Result
10
20
30
40
50
60
70
80
90