Question: please use python Our sun appears bright in the daytime sky most of the time. During a solar eclipse however, the moon passes between the
please use python
Our sun appears bright in the daytime sky most of the time. During a solar eclipse however, the moon passes between the earth and sun casting a shadow on the surface of the earth. You have been asked to create a animated graphics simulation of the appearance of a solar eclipse from the earth's surface. Define a function named q30 that uses the Python Graphics module and creates a 300x300 window with a black background. A large white circle (radius 100) should be drawn in the center of the graphics window and will represent the sun. A text message should appear in the middle of the circle asking the user to click to begin the simulation. Once a mouse click is detected, the message should be removed and an identically sized black circle representing the moon should start to the left of the 'sun' then pass from left-to-right smoothly across until it eventually blocks our view of the sun. The moon's black circle should continue to move across the screen (1 or 2 pixels at a time) until the sun is completely visible again. At this point another message should appear stating the the simulation is over. A final mouse click should close the graphics window and the function should end. Your function should create a graphics animation very similar to the following screenshots: The q3(0 function will not accept any parameters or return any values. All the necessary commands for the graphics animation should be contained within the function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
