{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Reflection 1-solutions - sung(es24394 Reection 1 chiu(57460...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
sung (es24394) – Reflection 1 – chiu – (57460) 1 This print-out should have 9 questions. Multiple-choice questions may continue on the next column or page – find all choices before answering. 001(part1of7)10.0points 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? 1. A . vector= < 3 , 0 , 0 > B . vector= < 5 , 2 , 0 > 2. A . vector= (3 , 0 , 0) B . vector= (5 , 2 , 0) 3. A= (3 , 0 , 0) B= (5 , 2 , 0) 4. A . vector= vector(3 , 0 , 0) B . vector= vector(5 , 2 , 0) 5. A= < 3 , 0 , 0 > B= < 5 , 2 , 0 > 6. A= vector(3 , 0 , 0) B= vector(5 , 2 , 0) correct Explanation: 002(part2of7)10.0points Which line of code correctly calculates the vector C? 1. C = B - A correct 2. C = < B > - < A > 3. C = A - B 4. C = vector(A) + vector(B) 5. C = vector(A) - vector(B) 6. C = < A > - < B > Explanation: 003(part3of7)10.0points Verify that C comes out as expected. Which
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern