Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help in PYTHON not MATLAB. Problem #1 A hiker needs to cross a sandy area in order to get from point A to a
Please help in PYTHON not MATLAB.
Problem #1 A hiker needs to cross a sandy area in order to get from point A to a camp site at point B. She can do so by crossing the sand perpendicular to the trail and then walking along the trail (red arrow path), or by crossing the sand at an angle o up to the trail, and then walking along the trail (blue arrow path). The hiker can walk 3.5 km/h in the sand and 5 km/h on the trail. Determine the time it will take her to reach the camp site for angle Ofrom 0 to 60 in 5 increments. trail area AB The distances w and u are: sandy area W= 4.5 km and u = 14 km . Part 1: Write a Python script that fulfills these specifications: Uses a NumPy vector to hold the angle values. Determines the total time t (in hours) needed to hike from point A to point B for each angle 8. Note: Do not calculate the results by individually plugging in angle values one at a time. Instead, use NumPy's built-in element-wise array operators and functions to do this operation efficiently. Displays a table of the calculated values, with the angle 0 in the first column and calculated time t in the second column. The columns should have labels to indicate what they represent. Do NOT use for or while loops for printing the table. You can simply display an appropriately constructed array. It won't look very nice, but it will be sufficient. OPTIONAL: If you want to be fancier and have Anaconda or Miniconda installed on your own computer, try the tabulate module. It has to be installed into your environment first by using conda install tabulate at the Anaconda Prompt. Do NOT use pip install! Generates a plot that fulfills these requirements: o Displays the hiking time 1 (vertical axis) versus the angle # (horizontal axis) Has labeled axes and a descriptive title Save the script using this file name: hw1_p1.py o 0 0 Part 2: Create a document (in Word docx or pdf format) that shows how you derived the equations you used to solve the problem. Include enough detail so that the grader can understand your thinking process. Put the course number, homework #. problem #, and your name at the top of the document. Save the document using this file name: hw1_p1_derive.docx or hw1_p1_derive.pdf Theta (deg) Time (hr) 4.08571 5 4.01189 10 3.94685 15 3.88992 20 3.84066 25 3.79895 30 3.765 35 3.73938 40 3.72319 45 3.71827 50 3.72764 55 3.75624 60 3.81258 Time to hike from Point A to camp site at point B A B 4.10 4.05 400 3.95 Timet [hours) 3.90 3.85 3.80 3.75 3.70 0 0 10 20 40 50 60 30 Angle (degrees)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started