Your instructor may assign one or more of the following problems. Don’t feel that you must do all the problems; for the homeworks, you are only required to do those that are explicitly assigned via Moodle.
Extend your circle class from the previous homework in the following ways.
circle.py solution
and modify it so that it raises an appropriate exception when bad
values are supplied to the constructor or mutators.
circles.txt file.
circle_driver.py program to read a
filename from the user and create a list of circles based on the
specifications loaded from that file. Be sure to handle any
exceptions that are likely to be raised by the user input or
incorrect values in the file.
You do not need to render the circles using a turtle.
With these things in place, running circle_driver.py
should work properly, with graceful exception handling, and running
circle_test.py should demonstrate that the circle class
is implemented correctly.
Extend your rectangle class from the previous homework in the ways analogous to those specified for the circle class in the previous homework problem.
lab05 (spirograph.py) and add error handling, function definitions, and fix the flow of the code:
turt.pencolor(the_color). If the_color is illegal, an exception is raised.tryAgain() that asks the user if they would like to draw another spirograph, and checks if their answer is Y, y, n, or the empty string. It repeats the question if an illegal value is given. The function returns True if the user wants to draw another spirograph, and False otherwise. (Note: no try/except block is needed for this.)tryAgain() to ask if they want to draw another.Submit all appropriate files for grading, including code files, screen captures, supplemental files (e.g., image files), and text files. We will grade this exercise according to the following criteria: