You will write three small functions about the electric field of point charges. They use and the rule that fields add as vectors.
The idea. The constant is . Charges are given in nC and distances in metres. On a line, a field towards is positive and a field towards is negative. The field of a positive charge points away from it. The field of a negative charge points towards it.
Your tasks.
point_field, return the size of the field of one charge q_nc (in nC) at a distance r (in m), in N/C.net_field_on_line, charges is a list of (charge in nC, position in m) on the axis. Return the net field at the position x, in N/C, with the sign described above.zero_point, two charges of the same sign, q1_nc and q2_nc, are a distance d apart. Return the distance from the first charge to the point between them where the field is zero.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…