6. Nested loops¶
Prints multiplication tables from 1 to 10
xxxxxxxxxx
multiplication_table = 1
while multiplication_table <= 10:
n = 1
print("\nMultiplication table of %d" %multiplication_table)
while n <= 10:
print("%d x %d = %d" %(multiplication_table, n, multiplication_table * n))
n = n + 1
multiplication_table = multiplication_table + 1
Activity: 6.1 ActiveCode (ac_l15_6_en)

“Life is like riding a bicycle. To keep your balance, you must keep moving” - Einstein
Activity: 6.2 Poll (TWP15E)
You have attempted 1 of 3 activities on this page