a) (Please name this program Lab2b_Prog2a.py.) Write a program that will take two observed 3D positions at two points in time, and then will calculate the 3D position at a third point in time.. Let's consider only times between the two observed times. You should output the x, y, and z values for that position on separate lines. Begin by identifying the variables you will use, the names for those variables, and the computations that should occur for those variables. Then, write a program that will output the 3D position of the interpolated point on 3 separate lines. For this initial program, you can use the following data values: • At time 13, observed position was (1, 3, 7) meters At time 84, observed position was (23, -5, 10) meters You want to find the position at time 50 seconds As for Program 1 above, please document your code using comments and print data labels and units to the screen to identify your output. Sample output: time of interest = 50 seconds 12.464788732394366 m -1.169014084507042 m 8.56338028169014 m хо y0 %3D z0

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

Please help me solve parts a and b in python coding. Include screenshots of your code for better understanding. Thank you :)

a) (Please name this program Lab2b_Prog2a.py.) Write a program that will take two observed 3D
positions at two points in time, and then will calculate the 3D position at a third point in time.
Let's consider only times between the two observed times. You should output the x, y, and z
values for that position on separate lines. Begin by identifying the variables you will use, the
names for those variables, and the computations that should occur for those variables. Then,
write a program that will output the 3D position of the interpolated point on 3 separate lines.
For this initial program, you can use the following data values:
• At time 13, observed position was (1, 3, 7) meters
At time 84, observed position was (23, -5, 10) meters
You want to find the position at time 50 seconds
As for Program 1 above, please document your code using comments and print data labels and
units to the screen to identify your output. Sample output:
time of interest = 50 seconds
12.464788732394366 m
-1.169014084507042 m
8.56338028169014 m
x0
y0
z0
b) (Please name this program Lab2b_Prog2b.py.) Now, copy Lab2b_Prog2a.py from above into a
new program, Lab2b_Prog2b.py.. You are going to modify the program in the following ways:
a. When outputting the position, follow the output by a line of dashes ("----
b. Instead of just computing the interpolation at one point and printing the result, you will
now compute it at 5 points. Copy the portion of the code (cut and paste the code) that
is needed to recompute interpolation 5 times. You should now interpolate at the times
-").
Transcribed Image Text:a) (Please name this program Lab2b_Prog2a.py.) Write a program that will take two observed 3D positions at two points in time, and then will calculate the 3D position at a third point in time. Let's consider only times between the two observed times. You should output the x, y, and z values for that position on separate lines. Begin by identifying the variables you will use, the names for those variables, and the computations that should occur for those variables. Then, write a program that will output the 3D position of the interpolated point on 3 separate lines. For this initial program, you can use the following data values: • At time 13, observed position was (1, 3, 7) meters At time 84, observed position was (23, -5, 10) meters You want to find the position at time 50 seconds As for Program 1 above, please document your code using comments and print data labels and units to the screen to identify your output. Sample output: time of interest = 50 seconds 12.464788732394366 m -1.169014084507042 m 8.56338028169014 m x0 y0 z0 b) (Please name this program Lab2b_Prog2b.py.) Now, copy Lab2b_Prog2a.py from above into a new program, Lab2b_Prog2b.py.. You are going to modify the program in the following ways: a. When outputting the position, follow the output by a line of dashes ("---- b. Instead of just computing the interpolation at one point and printing the result, you will now compute it at 5 points. Copy the portion of the code (cut and paste the code) that is needed to recompute interpolation 5 times. You should now interpolate at the times -").
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

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