Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python 3: i always grde my answer In this assignment you will begin to make a ball clock program. Your program will have two

using python 3: i always grde my answer

In this assignment you will begin to make a ball clock program.

Your program will have two functions: a main function and a function to set the time.

In the main function you will:

Make a turtle Screen. You may want to set its coordinates to an appropriate size.

Allow the user to enter the time in the usual format, for example, 12:34. Use a turtle method to get this input.

Call the function to set the time.

The function to set the time has two integer parameters: one for the hours and the other for the minutes.

Create four lists: the one minute rail, the five minute rail, the hour rail, and the reserve rail (for the extra balls). These four rails will be arranged horizontally with the one minute rail on the top and the reserve rail on the bottom.

Determine how many balls should go in each of the four rails (lists) based on the parameters to the function. The number of balls for the reserve rail should be 30 minus the sum of those on the other three rails.

For the one minute rail, iterate over how many balls should be put into its list. On each iteration,

Make a Turtle object with a circle shape, move it to the proper location on the screen, and add it to the end of the list for rail.

Do the same for the 5 minute, hour, and reserve rails.

Label the 1 minute, 5 minute, and hours rails to identify them.

After the four lists are constructed, return a tuple consisting of the four lists.

Here is the ball clock set to 11:48

image text in transcribed

Start Date

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago