Question

Python pleases! Write a program that will produce the following table below. You will use a...

Python pleases!

Write a program that will produce the following table below. You will use a nested

for loop and a duplicate nested while loop in one program. Note that this is the one through twelve

multiplication table. Write the flowchart for the program.

X 1 2 3 4 5 6 7 8 9 10 11 12
1 1 2 3 4 5 6 7 8 9 10 11 12
2 2 4 6 8 10 12 14 16 18 20 22 24
3 3 6 9 12 15 18 21 24 27 30 33 36
4 4 8 12 16 20 24 28 32 36 40 44 48
5 5 10 15 20 25 30 35 40 45 50 55 60
6 6 12 18 24 30 36 42 48 54 60 66 72
7 7 14 21 28 35 42 49 56 63 70 77 84
8 8 16 24 32 40 48 56 64 72 80 88 96
9 9 18 27 36 45 54 63 72 81 90 99 108
10 10 20 30 40 50 60 70 80 90 100 110 120
11 11 22 33 44 55 66 77 88 99 110 121 132
12 12 24 36 48 60 72 84 96 108 120 132 144

Rubric

Test 3: Nested Loops - Multiplication Tables

Test 3: Nested Loops - Multiplication Tables

Criteria Ratings Pts This criterion is linked to a Learning OutcomeOuter for loop 10.0 pts Full Marks 0.0 pts No Marks 10.0 pts This criterion is linked to a Learning OutcomeInner for loop 10.0 pts Full Marks 0.0 pts No Marks 10.0 pts This criterion is linked to a Learning OutcomeOuter while loop 10.0 pts Full Marks 0.0 pts No Marks 10.0 pts This criterion is linked to a Learning Outcomeinner while loop 10.0 pts Full Marks 0.0 pts No Marks 10.0 pts This criterion is linked to a Learning OutcomeIf statement 10.0 pts Full Marks 0.0 pts No Marks 10.0 pts This criterion is linked to a Learning OutcomeCompound condition 10.0 pts Full Marks 0.0 pts No Marks 10.0 pts This criterion is linked to a Learning OutcomePrint table 20.0 pts Table prints as required 10.0 pts Table is display not as required 0.0 pts No table displayed 20.0 pts This criterion is linked to a Learning OutcomeProgram Runs 20.0 pts Runs Perfectly 12.0 pts Runs with errors 0.0 pts Doesn't run 20.0 pts Total Points: 100.0

PreviousNext

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Part 1:

print('%5s' %('X') , end = '')

for i in range(1 , 13):

    print('%4d ' %(i), end = '')

  

print()

for i in range(1 , 13):

    print('%4d ' %(i), end = '')

    for j in range(1 , 13):

        print('%4d ' %((i * j)), end = '')

       

    print()

Part 2 :

print('%5s' %('X') , end = '')

i = 1

while i < 13:

    print('%4d ' %(i), end = '')

    i += 1

print()

i = 1

while i < 13:

    print('%4d ' %(i), end = '')

    j = 1

    while j < 13:

        print('%4d ' %((i * j)), end = '')

        j += 1

    print()

    i += 1

Flow Chart

Add a comment
Know the answer?
Add Answer to:
Python pleases! Write a program that will produce the following table below. You will use a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • in Java programming Using IF statement, write a program that prints multiplication table for 1-10. Sample...

    in Java programming Using IF statement, write a program that prints multiplication table for 1-10. Sample Program Output. 1     2     3     4     5     6     7     8     9     10       1     1     2     3     4     5     6     7     8     9     10       2     2     4     6     8     10    12    14    16    18    20       3     3     6     9     12    15    18    21    24    27    30       4     4     8     12    16    20    24    28    32    36    40       5     5     10   ...

  • This program is C++ You have just been offered your first big software contract. The scope...

    This program is C++ You have just been offered your first big software contract. The scope of work is to create a tool for grade school students to learn their times tables. In this program, you will create a 10 x 10 grid of times tables as a cheat sheet for the students to learn. This will display the values of the times tables all the way from 1x1 to 10x10. Make use of formatting tools like inserting tabs, setwidth(),...

  • Write a Java program that uses nested for loops to print a multiplication table as shown...

    Write a Java program that uses nested for loops to print a multiplication table as shown below. Make sure to include the table headings and separators as shown. The values in the body of the table should be computed using the values in the heading e.g. row 1 column 3 is 1 times 3. * | 1 2 3 4 5 6 7 8 9 4 | 1| 1 2 3 456 7 8 9 2 | 2 4 6.8...

  • NB: All C programs should be compiled using C Compiler application. The code should be shown...

    NB: All C programs should be compiled using C Compiler application. The code should be shown on the document. A screen shot of the running program given as output on the assignment. a). Describe the types of arrays and operations that can be performed of them. [10] b). Write a program to print the multiplication table from 1*1 to 12*10. [10] Example MULTIPLICATION TABLE 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12...

  • Using Python, Can someone please assist in the following: These are the hints: Summary This week's lab is to create a simple multiplication table using nested loops and if statements. Prompt the...

    Using Python, Can someone please assist in the following: These are the hints: Summary This week's lab is to create a simple multiplication table using nested loops and if statements. Prompt the user for the size of the multiplication table (from 2x2 to 10x10). Use a validation loop to display a warning if the number is less than 2 or greater than 10 and prompt the user to enter the data again until they enter a valid number Put a...

  • Java Submit a program in a .java file. The program should print a multiplication table for...

    Java Submit a program in a .java file. The program should print a multiplication table for the numbers 1-9. This requires a nested for loop. The outer loop moves from row to row, while the inner loop prints the row. Use tabs to separate the output, such as in the following statement:      System.out.println(“1\t2\t3\t4\t5\t6\t7\t8\t9”); Output should look similar to the following. 1      2     3     4     5     6     7     8     9 ------------------------------------------------------------------ 1       2     3     4     5     6        7     8     9...

  • Write a C program to print the figure as follows. 5, Write a C program to...

    Write a C program to print the figure as follows. 5, Write a C program to print the figure as follows. 1 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 4 6 8 10 12 14 16 18 9 12 15 18 21 24 27 16 20 24 28 32 36 25 30 35 40 45 36 42 48 54 49 56 63 64 72 81 1 Tip: use loop.

  • Write a program in C that stores the result of all multiplications between 1 and 9...

    Write a program in C that stores the result of all multiplications between 1 and 9 in a two-dimensional int array and then prints the contents of the array to the screen. Also, write some comments in the code. Example: Expected output: 1 4 6 7 8 8 1 12 14 16 18 4 3 6 9 12 15 18 21 24 27 4 8 12 16 20 24 28 32 36 5 1e 15 20 25 30 35 40...

  • Write a Python program to print a timetable. E.g. printTimesTable(n), 1<n<10 Or you can make your...

    Write a Python program to print a timetable. E.g. printTimesTable(n), 1<n<10 Or you can make your program be interactive with user by S. Asking user to input their number n. Your program will generate a table such as the following: 1 2 3456789 24 6 8 10 12 14 16 18 3 6 91215 18 21 24 27 4 812 16 20 24 28 32 36 5 10 15 20 25 30 35 40 45 6 12 18 24 30...

  • Using Html 5: - You are to create a table consisting of 11 rows and 11...

    Using Html 5: - You are to create a table consisting of 11 rows and 11 columns. The table cells are to be 40 pixels wide, each row. The table is to also have a header row that spans across all columns and contains 'Multiplication Math' as the table name. - Alternating rows will have a different background color. - The table is to be centered in the HTML page. The top table row is to have the numbers 1-10...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT