Question: Using Python Below you find the definition of a function called E_point to compute the electric field E at position r when a point charge

Using Python
Below you find the definition of a function called E_point to compute the electric field E at position r when a point charge q is located at position ro. Familiarize yourself with the code. Do you understand what is done? If unsure, please ask! Or go back to the section on functions. Add comments (1.-7.) to document what the function does step by step. (10 marks) Test the function thouroughly: For example -- is the output of the function a vector? Are the values sensible? Use the whiteboard examples as test cases you can compare the answer to? That means, start with the case where the charge sits at the origin and calculate the electric field at r= (2,0,0), r = (v2,v2),0) and r= (0,2,0) for a charge of q=1. Next, change the variables r, ro and q successively. (10 marks) Below you find the definition of a function called E_point to compute the electric field E at position r when a point charge q is located at position ro. Familiarize yourself with the code. Do you understand what is done? If unsure, please ask! Or go back to the section on functions. Add comments (1.-7.) to document what the function does step by step. (10 marks) Test the function thouroughly: For example -- is the output of the function a vector? Are the values sensible? Use the whiteboard examples as test cases you can compare the answer to? That means, start with the case where the charge sits at the origin and calculate the electric field at r= (2,0,0), r = (v2,v2),0) and r= (0,2,0) for a charge of q=1. Next, change the variables r, ro and q successively. (10 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
