Question
A decorating company wants to produce two multiplication decorating patterns such as in Figure 1. You are required to develop a program that creates the
A decorating company wants to produce two multiplication decorating patterns such as in Figure 1. You are required to develop a program that creates the multiplication pattern separately in 2 different functions. At the beginning of the program, the user is required to enter a digit between 1 to 9. If the user enters a digit outside the range of 1 to 9, an error message will appear, informing the user that the entered digit is out of range. Next, the user needs to choose either the first choice of multiplication decoration pattern (a) or the second choice of multiplication decoration pattern (b). For example, Figure 1(a) shows the output when the user enters the digit 9 for the first option and Figure 1(b) shows the output when the user enters the digit 9 for the second option.
Enter a digit between 1 to 9: 9 Choice of decoration pattern (1: for increasing order and 2: for decreasing order): 1 1 2 3 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 ) (a) Enter a digit between 1 to 9: 9 Choice of decoration pattern (1: for increasing order and 2: for decreasing order): 2 81 72 64 63 56 49 54 48 42 36 NW Arooo 18 16 14 12 10 8 6 4 27 24 21 18 15 12 9 36 32 28 24 20 16 45 40 35 30 25 1 (6) Figure 1: Decoration patterns (a) Increasing order (b) decreasing order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started