Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do this in python 3.8 10:14 - O 0 OR 4 85% hmwk1b_-545012169.pdf ENG-101 Intro Computing Engineers Due: 22 MW (23 TR) January 2019

Please do this in python 3.8

image text in transcribedimage text in transcribed

10:14 - O 0 OR 4 85% hmwk1b_-545012169.pdf ENG-101 Intro Computing Engineers Due: 22 MW (23 TR) January 2019 at 6:00PM start of class. Question 1 (10 points) Write a well-documented, Python program, wk101.py that simulates a person hauling a boat towards a dock. The rope is pulled in at the rate of 1 m/s. The initial rope length (0) = 10. Use Python lists to represent time t and the quantities (t),() (). Also, have your program find the minimum of the range-rate i(2). 4 m x(t) Boot Boat Problem Geometry Hints: Form a time list from 0 to 6 seconds in increments of 100 ms. Use a forloop to form the quantities st) 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.) -l. There will be one less term .) than X(t) Distance Vs. Time 'Howk101.png" OPTIONAL - NOT TO BE TURNED IN Page 1 10:14 O R4 185% OPTIONALLY: You can plot the two lists on a single graph by importing the package MATPLOTLIB. The package is NOT installed by default by the python.org distribution. MATPLOTLIB is installed on pythonanywhere.com where your program should be executed. import matplatlib matplatlib.usc("Age") import matplotlib.pyplot as plt fig-pit.figured) ax = fig.add_subplot(111) ax.plot(t,s, label='5') ax.hold/True) ax.plot(t,x, label -x) ax.grid) les - ax legendt) plt.xlabel("time [s]") plt.ylabel('dist [m]") plt.title|"Hmwk1Q1 Boat Location") fig.savefige Hmwk101.png Grading: Submit hmwk 101.py to Canvas, Two-points for calculating each list,s(t), y(t) and (t). Two-points for the correct minimum range rate it). Page 2

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

Demonstrate three aspects of assessing group performance?

Answered: 1 week ago