Question: Python Programming Assignment Vector Analysis In this assignment, the student will write a Python script that calculates the sum, difference, and magnitudes of two user
Python Programming Assignment
Vector Analysis
In this assignment, the student will write a Python script that calculates the sum, difference, and magnitudes of two user defined vectors. When completing this assignment, the student should demonstrate mastery of the following concepts:
Basic User Prompting
Variable Types and Weak Typing
Mathematical Assignments
Simple Output Formatting
Intuitive Design
Assignment
Write a program that prompts the user for his/her name. After that, prompt the user for the x and y coordinates that will be assigned to two vectors. Have the program calculate the magnitude of the vectors and display the sum and difference of the vectors along with the users name. Make use of the input() and raw_input() appropriately when prompting the user. When displaying the result, round each value to three decimal positions. Make your output match the provided output as closely as possible.
The following mathematical definitions will be helpful in performing your calculations:
Relating Square Roots to Exponents
sqrt(x) = x(1/2)
Pythagorean Theorem (for calculating magnitudes)
A2 + b2 = c2
Vector Addition
Vector Subtraction
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
