Use the calculations provided to create a function which will tell how far the object will travel when the elevation of the canon is set to zero. 2. Use the calculation to create a function which will return the angle which can be used to hit a target a specific distance (d) using a given initial velocity(v)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
1. Use the calculations provided to create a function which will tell how far the object will travel when the elevation of the canon is set to zero. 2. Use the calculation to create a function which will return the angle which can be used to hit a target a specific distance (d) using a given initial velocity(v)
The following lines of code will determine the distance (d) that an object will travel when fired from ground
level with a given initial velocity (v) and angel (a)
Challenge
radians = (a*math.pi)/180
Vx = v*(math.cos (radians))
Vy = v*(math.sin(radians))
d = (Vx*2*Vy)/9.81
1
Create a function which takes in the initial velocity(v) and angle(a) and returns the distance(d) the object will travel.
Game
Link
15.0 m
Initial Speed 15 m/s
O Normal
II O
Slow
The lines of code to the right will determine the angle(A or B) if d > distance(v,45):
that the canon must be set to travel a given distance (d) for a
given initial velocity(v)
print("No angle will reach the target.", end="")
print(" The velocity must be increased")
return ("Not Possible")
theta - (9.81*d/(v*v))
S - math.asin(theta)
#print(s)
SS*180/math.pi
Sprint(s)
A - s/2
B - (180 - s)/2
if d == distance(v,A) and A>=25:
print("You will require an angle of", A)
return (A)
else:
Create a function which takes in the initial velocity and the
distance desired and returns the angle which must be used.
print("You will require an angle of", B)
return (B)
**** This new function actually calls another function while
running. The function, distance(v,A) , is the function you
created in the first challenge. ****
Challenge
Game
Link
2
10.0 m
Iitiel fi 15 e
Transcribed Image Text:The following lines of code will determine the distance (d) that an object will travel when fired from ground level with a given initial velocity (v) and angel (a) Challenge radians = (a*math.pi)/180 Vx = v*(math.cos (radians)) Vy = v*(math.sin(radians)) d = (Vx*2*Vy)/9.81 1 Create a function which takes in the initial velocity(v) and angle(a) and returns the distance(d) the object will travel. Game Link 15.0 m Initial Speed 15 m/s O Normal II O Slow The lines of code to the right will determine the angle(A or B) if d > distance(v,45): that the canon must be set to travel a given distance (d) for a given initial velocity(v) print("No angle will reach the target.", end="") print(" The velocity must be increased") return ("Not Possible") theta - (9.81*d/(v*v)) S - math.asin(theta) #print(s) SS*180/math.pi Sprint(s) A - s/2 B - (180 - s)/2 if d == distance(v,A) and A>=25: print("You will require an angle of", A) return (A) else: Create a function which takes in the initial velocity and the distance desired and returns the angle which must be used. print("You will require an angle of", B) return (B) **** This new function actually calls another function while running. The function, distance(v,A) , is the function you created in the first challenge. **** Challenge Game Link 2 10.0 m Iitiel fi 15 e
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY