Question: Enhance the hit_the_target.py program that you saw in Program 3-9 so that, when the projectile misses the target, it displays hints to the user indicating

Enhance the hit_the_target.py program that you saw in Program 3-9 so that, when the projectile misses the target, it displays hints to the user indicating whether the angle and/or the force value should be increased or decreased. For example, the program should display messages such as 'Try a greater angle' and 'Use less force.'Program 3-9 (hit_the_target.py) 1 # Hit the Target Game import turtle 2 3 4 # Named constants 7 5 SCREEN

20 # Draw the target. 21 turtle.hideturtle() 22 turtle.speed (0) 23 turtle. penup() 24 turtle.goto

Program 3-9 (continued) 33 turtle. forward(TARGET_WIDTH) 34 turtle.penup() 35 36 37 turtle.goto(0, 0) 38

Figure 3-19 Troubleshooting a bad Wi-Fi connection No No Make sure the cables between the router & modem are plugged in firmly. Did that fix the problem? Reboot the computer and try to connect. Reboot the router and try to connect. No Did that fix the problem? Yes Did that fix the problem? Yes Yes

Step by Step Solution

3.56 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Algorithm of the code Import the turtle module Define the named constants SCREENWIDTH Width of the game screen SCREENHEIGHT Height of the game screen TARGETLLEFTX Xcoordinate of the targets lowerleft ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Python Questions!