Question: Question 3: Bottle In this question, you are going to print a bottle pattern using symbols according to the size input by the user. The

Question 3: Bottle In this question, you are going to print a bottle pattern using symbols according to the size input by the user. The pattern to be generated depends on whether the 8th di of your student ID number is odd or even, according to the table below: If the 8 digit of your The program prints student ID number is Odd Even An upright bottle An inverted bottle Complete the function Q3, so that when the user enters 3 in the Program Selection Menu, the program prints the required pattern with the following requirements 3R1 The program lets user enter the size value within the range 2 to 6 inclusively, without showing any prompt messages 3R2 Following 2R1 above, if the user inputs an invalid size, the program should display Error" in one line, and allow user to input again until a correct value is received. Again, no prompt messages are shown during user input. Note the meaning of size in the pattern. Make sure that the number of rows and the number of 3R3 symbols in each row are printed correctly After printing the pattern, question 3 completes and the program returns back to the Program Selection Menu. 3R4 Make sure that your program prints the correct pattern (an upright or an inverted bottle) based on your student ID number. 3R5 is required in your codes. 3R7 You can assume that the users always enter integers when being asked for input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
