$24
The goal of this lab is practice testing and using while-loops. You should work individually
on this assignment.
To earn full credit, you must use while loops.
Getting Started
You should start by creating a folder specically for this assignment. Create a README.txt le including three things: your name, the course name, and the name of this assignment. You should also use it answer any questions that may be asked in this assignment along with including any comments that you want the grader to consider when grading your assignment. You should not include any code in your README.txt le.
More Loops
In this assignment, you are to write several functions in moreShapes.py that will complete a program that is capable of drawing shapes on the console.
Start by reading through the provided driver program found in moreShapesDriver.py . This le contains three functions:
menu displays a menu of options to the user and reads in the user's choice form the keyboard, and ensures that the option is valid. It is used in the main function.
readInteger is used to gather di
erent integer values from the user and makes sure that the values entered by the user are all positive integers. It is used in the main function.
Finally, the main function is where the program begins by displaying the menu, and uses the option chosen by the user to required information from the user before calling a function in the shapes module. You will implement these functions.
Your submission will be evaluated against the original driver program so you should not change any of the function parameters.
2.1 Lower-Right Triangle
For this option, implement a lower-right triangle of the speci
ed size. For example, a lower triangle of size 6 would draw:
*
**
***
****
*****
******
2.2 Upper-Right Triangle
For this option, implement an upper-right triangle of the specied size. For example, an upper triangle of size 8 would be:
********
*******
******
*****
****
***
**
*
2.3 Right Arrowhead
For this option, implement an right arrowhead of the specied size. For example, an arrow head of size 5 would draw:
*
**
***
****
*****
****
***
**
*
2.4 Boomerang
For this option, implement a boomerang of the specied size. For example, a boomerang head of size 5 would draw:
*
**
***
****
*****
****
***
**
*
2.5 Diamond
Design an algorithm that will draw a diamond. Your algorithm should prompt the user for the size of the diamond that they would like to draw and then draw it. Diamonds can only be an odd size. For example,
Enter size: 9
*
***
*****
*******
*********
*******
*****
***
*
Submit Files to Bottlenose
Before submitting, be sure that you have added a comment at the top of your source les that includes your name and the current date. Then create an archive of the folder that you created for this assignment containing all of the les that you have created and upload this archive to Bottlenose for grading. When you upload, be sure to check whether there are any auto-graders that evaluated your code and x any issues pointed out by the auto-graders. After submitting your assignment, complete the Homework 5 Review.