Exercise #1

Course links

According to Coulomb's Law, two electrically charged particles attract or repel one another with a force F that is proportional to their charges q1 and q2 and inversely proportional to the square of the distance r between them:

F = kq1q2 / r2

The constant of proportionality, k, is called Coulomb's constant. If the force is measured in newtons (that is, kilogram-meters per second squared) and the charges are measured in coulombs, the value of Coulomb's constant is 8.988 * 109 newton-square-meters per square coulomb (8.988 * 109 N m2 / C2).

  1. Write a Scheme definition that gives Coulomb's constant an appropriate name.

  2. Using the previous definition, define and test a Scheme procedure that computes the force of repulsion between two similarly charged particles, given their charges (in coulombs) and the distance between them (in meters).

  3. Using the previous definition, define and test a Scheme procedure that takes three arguments -- the charges of two similarly charged particles (in coulombs) and a list of distances between them -- and constructs and returns a list containing the forces of repulsion that the particles would exert on one another at those distances.

  4. Save the three definitions, which make up a program, from the Definitions window (as text). Run your test cases in the Interactions window and save them (as text, in a different file). E-mail them to me by following the instructions given in the handout ``Submitting solutions by e-mail''.

This exercise will be due at 2:15 p.m. on Wednesday, February 9.