![]() | |
Teachers Assignments Assignments Other Pages | Project 3: Assigned: Mon Sep 09 2024 Now you'll get a chance to use modulus and conditionals in your programming. Enjoy! Part 0, 1 points: Implement >>> print_minutes_hand(17)
17 minutes after noon, the big hand is pointing to 17 minutes.
>>> print_minutes_hand(213)
213 minutes after noon, the big hand is pointing to 33 minutes. Tester.Part 1, 1 points: Implement >>> print_hours_hand(17)
17 minutes after noon, the little hand is pointing to 0 hours.
>>> print_minutes_hand(213)
213 minutes after noon, the little hand is pointing to 3 hours. Notice that we say we're pointing to the 0 instead of the 12. Tester.Part 2, 2 points: From class: >>> print_about_positivity(17)
It is True that 17 is positive.
>>> print_about_positivity(-100)
It is False that -100 is positive. Remember that for this problem, I don't want you to use conditionals (e.g. if ). Tester.Part 3, 2 points: Write a new function, Yes, X is divisible by 3. otherwise, your code should print No, X isn't divisible by 3. (Though use the actual number instead of X.) Tester.Part 4, 2 points: Write a new function, >>> print_whether_triangle(3.0, 5.0, 7.0)
A triangle can have sides of length 3.0 , 5.0 , and 7.0 .
>>> print_whether_triangle(5.0, 1.0, 3.0)
A triangle cannot have sides of length 5.0 , 1.0 , and 3.0 . Be careful! It shouldn't matter which order the numbers are in!>>> print_whether_triangle(3.0, 5.0, 4.0)
A triangle can have sides of length 3.0 , 5.0 , and 4.0 .
>>> print_whether_triangle(5.0, 3.0, 4.0)
A triangle can have sides of length 5.0 , 3.0 , and 4.0 . Degenerate cases should also be allowed:>>> print_whether_triangle(1.0, 2.0, 3.0)
>>> A triangle can have sides of length 1.0 , 2.0 , and 3.0 . Those extra spaces might annoy you. If you decide to improve your code to remove any of them, please be sure to remove all of them:>>> print_whether_triangle(3.0, 5.0, 4.0)
A triangle can have sides of length 3.0, 5.0, and 4.0. Tester.Part 5, 2 points: Write a new function, >>> print_whether_right_triangle(3.0, 5.0, 4.0)
A right triangle can have sides of length 3.0 , 5.0 , and 4.0 .
>>> print_whether_right_triangle(3.0, 6.0, 4.0)
A right triangle cannot have sides of length 3.0 , 6.0 , and 4.0 . Be careful! It shouldn't matter which order the numbers are in!>>> print_whether_right_triangle(3.0, 5.0, 4.0)
A right triangle can have sides of length 3.0 , 5.0 , and 4.0 .
>>> print_whether_right_triangle(5.0, 3.0, 4.0)
A right triangle can have sides of length 5.0 , 3.0 , and 4.0 . Those extra spaces might annoy you. If you decide to improve your code to remove any of them, please be sure to remove all of them:>>> print_whether_right_triangle(3.0, 5.0, 4.0)
A right triangle can have sides of length 3.0, 5.0, and 4.0. Tester.Part 6, 1 points: Write a new function, >>> print_about_integers(1, 5)
The second number is higher.
>>> print_about_integers(5, 1)
The first number is higher.
>>> print_about_integers(6, 6)
The numbers are equal. Tester.Part 7, 2 points: Write a new function, >>> print_about_rectangle(1, 2, 1, 2)
Nice rectangle.
>>> print_about_rectangle(2, 2, 2, 2)
This is a square!
>>> print_about_rectangle(1, 2, 3, 4)
This isn't a rectangle! Tester.Submitting your Project: Make sure all your code is in a file labelled with your user name (everything before the @ in your school email address) followed by |