Question: Your task is to compute the total time taken by the robot to reach its goal, given the following Inputs (Figure 1): o The distance
Your task is to compute the total time taken by the robot to reach its goal, given the following\ Inputs (Figure 1):\ o The distance between the robot and the item in the x- and y-direction (dx and dy)\ o The speed of the robot on the road and the rocky terrain (s1 and s2)\ o The length l1 of the first segment (on the road)\ To test your Python program, lets make the problem more concrete. For the test case, lets \ assume the following dimensions (see figure 2 below with assumed values). The total time is \ the time for traversing both segments. \ Figure 2: Test case with assumed dimensions\ Develop the Python program that prompts user for input(s). Write your algorithm as comments \ in the Python program. Note that use variable names that are longer and more descriptive than \ dx or s1. Submit your Python program with your test running results. \ Output results must show:\ o x-disatnce to target:\ o y-distance to target:\ o Length of first segment:\ o Speed along first segment:\ o Speed along second segment:\ o Total travel time: \ 2.3 Write a program that helps a person decide whether to buy a hybrid car. Your\ programs inputs should be:\ o The cost of a new car\ o The estimated miles driven per year\ o The estimated gas price\ o The efficiency in miles per gallon\ o The estimated resale value after five years\ Compute the total cost of owning the car for five years. (For simplicity, we will not take the \ cost of financing into account.) Obtain realistic prices for a new and used hybrid and a \ comparable car from the Web. Run your program twice, using todays gas price and 15,000 \ miles per year. Include pseudocode and the program runs with your assignment.\
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
