Question: Write a program that can create four different patterns of different sizes. The number of columns or row determines the size of each pattern.
Write a program that can create four different patterns of different sizes. The number of columns or row determines the size of each pattern. For example, a pattern of size five has 5 columns and 5 rows. Each pattern is made of character $ and a digit, which shows the size. The size must be between 2 and 9. The following shows the patterns of size 5 Pattern One 5$$$$ $5$$$ $$5$$ $$$5$ $$$$5 . Pattern Two $$$$5 $$$5$ $$5$$ $5$$$ 5$$$$ Pattern Three $$$$$ $$$$5 $$$55 $$555 $5555 Make sure NOT to hard code any number for the pattern. Let the user decide a size between 2 and 9 CODE: The program specifications are: Use a function for user input: Pattern Four $$$$$ 5$$$$ 55$$$ 555$$ 5555$ The function should display a menu and ask the user to choose a pattern and size. Prompt user to choose an option only between 1 and 5, and a pattern size only between 2 and 9. Error check user input( you can use while loop) for numbers OUT of range Loop until user wishes to quit. (You may use do-while loop) Print a menu and echo user's response Make sure to provide four individual functions for displaying each of the four patterns.
Step by Step Solution
3.50 Rating (157 Votes )
There are 3 Steps involved in it
The simple Python program that fulfills the specificatio... View full answer
Get step-by-step solutions from verified subject matter experts
