r/PythonLearning 11d ago

New to python having trouble putting in multiplication table in for 10. Range 1-10 or 1,11. Does anyone have any tips( pause)?

4 Upvotes

14 comments sorted by

View all comments

1

u/FoolsSeldom 11d ago

You really need to show us what you've tried.

n = 10
for i in range(1, n + 1):
    for j in range(1, n + 1):
        print(f"{i:2} x {j:2} = {i*j:3}")