Malik A.

asked • 09/21/21

I need to do a 6x6 table on python, I tried to do many things, but non of the ways worked with me.

I need to do a table that has 6x6 in the range of 36, I tried for hours without any luck.


this is the last thing that I could do and it also doesn't work, but I think I am in the right direction


for i in range(19):

    for h in range(19):

        for x in range(19):

            for y in range(19):

                print (i * h * x * y, end=" ")

            print()

The output spouse to look like this

1 2 3 4 5 6

2 4 6 8 10 12

3 6 9 12 15 18

4 8 12 16 20 24

5 10 15 20 25 30

6 12 18 24 30 36


and the question was written like this

Write a program in exercise_03.py that uses a pair of nested for-loops to calculate and display a 6x6 multiplication table. The output should display a table with right-aligned, 4 character width columns.

2 Answers By Expert Tutors

By:

Kunal S. answered • 09/21/21

Tutor
5.0 (35)

Software developer with a passion for teaching

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.