Seesaw weight difference

Seesaws are fun! Unless the difference between the weights of the people is too great. Then…

Seesaw, 1902

If the difference between the weights of the people is more than 20% of their total weight, maybe they should skip the seesaw.

Here is a workbook with a program that warns the user if the difference between the weights is too high. Download the file, and save it on your computer.

In this situation…

Low difference

… the difference in weights is small. Click the Run button, and the program should tell you that seesawing is no problem. But in either of these situations…

High difference

High difference

… the program should warn you that there could be a problem.

The program doesn't work right. Fix it, and submit the fixed workbook.

Hint: Remember that you can use the debugger to look inside the code. Check out the value of variables, like difference.

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)

Keywords: 
Referenced in: 
Attachments: