Question: Write a well-documented, Python program, hmwk1Q1.py that simulates a person pulling a boat towards a dock. The rope is pulled in at the rate of



Write a well-documented, Python program, hmwk1Q1.py that simulates a person pulling a boat towards a dock. The rope is pulled in at the rate of 1m/s. Use Python lists to represent time t and the quantities s(t),x(t) and x(t). Also, have your program find the minimum of the range-rate x(t), using the Python function min 0 . Hints: Form a time list from 0 to 6 seconds in increments of 100ms. Use a for-loop to form the quantities s(t) and x(t) using the Pythagorean-theorem to relate s(t) and x(t) for all times in the time-list. Use a for-loop to form the quantity x(tn)tntn1x(tn)x(tn1). There will be one less term x(tn) than x(t). As such assign x(0)=0 Write a well-documented, Python program, hmwk1Q2.py that simulates launching a space-craft. The space-craft's speed is 5m/s. Use Python lists to represent time t and the quantities s(t),y(t) and (t). A formal expression for the angle is (t)=tan1xy(t) (radians). Space Craft Geometry Hints: Use the range-operator to form the time list from 0 to 10 seconds in increments of 100ms. Use a for-loop to form the quantities s(t) and x(t) using the Pythagorean-theorem to relate s(t) and y(t) for all times in the time-list. Write a well-documented, Python program, hmwk1Q2.py that simulates launching a space-craft. The space-craft's speed is 5m/s. Use Python lists to represent time t and the quantities s(t),y(t) and (t). A formal expression for the angle is (t)=tan1xy(t) (radians). Hints: Use the range-operator to form the time list from 0 to 10 seconds in increments of 100ms. Use a for-loop to form the quantities s(t) and x(t) using the Pythagorean-theorem to relate s(t) and y(t) for all times in the time-list. Use a for-loop to form the quantity (t). Python, however, does not have the function implemented natively. As a result, use the approximation tan1(x)x2x2+8x3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
