


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A reflection on the differences between mathematical vectors and vpython arrow objects, explaining their attributes and how to define, calculate, and display them in vpython. It includes multiple-choice questions, explanations, and code examples.
Typology: Quizzes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



This print-out should have 11 questions. Multiple-choice questions may continue on the next column or page – find all choices before answering.
001 (part 1 of 9) 10.0 points What is the difference between a mathe- matical vector and a VPython Arrow object?
Explanation:
002 (part 2 of 9) 10.0 points For a VPython Arrow object, what is the difference between the attributes ’pos’ and ’axis’?
003 (part 3 of 9) 10.0 points
Let’s say we want to turn the above diagram into a VPython scene. You should type in the correct lines of code for each question as you go so that you end up with a working program. Remember to begin every VPython program with the following two lines:
from future import division from visual import ∗
First, we will need to define our vectors A and B. Which two lines of Vpython code accomplish this?
A= vector(3, 0 , 0) B= vector(5, 2 , 0)
correct
A= vec(3, 0 , 0) B= vec(5, 2 , 0)
A.vector= (3, 0 , 0) B.vector= (5, 2 , 0)
A.vector=< 3 , 0 , 0 > B.vector=< 5 , 2 , 0 >
A.vector= vector(3, 0 , 0) B.vector= vector(5, 2 , 0)
Explanation:
004 (part 4 of 9) 10.0 points Which line of code correctly calculates the vector C?
Explanation:
005 (part 5 of 9) 10.0 points Verify that C comes out as expected. Which of the following lines of code will output C to the shell?
Explanation:
006 (part 6 of 9) 10.0 points Now that our vector objects are defined, let us display them. Which of the following lines of code correctly displays vector A in the VPython scene, as shown in the figure above?
Explanation:
007 (part 7 of 9) 10.0 points Which of the following lines of code correctly
Explanation:
011 (part 2 of 2) 10.0 points Inside the repetitive loop, assuming that we use the final velocity in each time interval as the approximation to the average velocity in that time interval, what should be the correct sequence of the following calculations? (A) Update the (vector) momentum of each object. (B) Calculate the (vector) forces acting on the objects. (C) Update the (vector) position of each ob- ject.
Explanation: