Due Date: midnight, Friday, 5 October.

This assignment focuses on graphics from Chapter 4.

Submit the following programs via Blackboard:

  1. Write a program that has the user click on 6 points and then draws two triangles. The first three points clicked make up the first triangle, and the last three points clicked make up the corners of the second triangle. Use the triangle.py program from the textbook as a basis for this program.
  2. Write a program that takes two mouse clicks from the user and draws a circle centered at the first point and whose radius is the distance between the two points. Use the triangle.py program from the textbook as a basis for this program.
  3. Write a program with a graphical user interface that asks the user for the number of miles and displays the corresponding number of kilometers. Use the convert_gui.pyw program from the text book as the basis for this problem.
  4. Write a program that allows the user to specify the number of dots to draw on the screen. Your program should have a text entry field and a button for the user to click, and then should draw the number of dots to the screen that the user specified. Use the convert_gui.pyw program from the text book as the basis for this problem.
  5. Modify the bouncing ball problem (from Lab 3) to ``wrap'' around the screen twice. That is, when the ball gets to the right end of the screen, have it continue on the left hand side. Hint: use the remainder operator (%) to make sure that the x-coordinate is always between 0 and the width of the window.
For more information on using Blackboard, see the first lab.

General Notes