Lecture 19 β ExercisesΒΆ
Solutions to the problems below must be sent to Submitty for automatic scoring. A separate file must submitted for each problem. Solutions must be submitted by 4 pm on Friday, April 7.
- The
Restaurant.py
file you were provided includes a main code area with code to test functions that have not yet been written (see the methods withpass
as their only statements). These are themin_review
, themax_review
, thelatitude
and thelongitude
. Please implement these functions, test them, and submit the resultingRestaurant.py
. - Copy the code in
lec19_restaurant_exercise.py
into a file calledlec19_american_in_troy.py
. Rewrite the main code in this new file to list the names of all Restaurants in Troy that have American in their category and that have an average rating of more than 3.0. The only output should be the alphabetical list of restaurant names, one per line of output. The trick is that you are not allowed to change theRestaurant
class at all. This will require that you access and use both one or two methods fromRestaurant
and some of its attributes directly. Upload yourlec19_american_in_troy.py
to Submitty when you are done. Submitty will use ourRestaurant.py
file to test.