class logo

CS 122 - Day 10 Exercises

This page lists some problems for today's class. After today, you should be able to solve these problems on your own. Problems with this color are more challenging.

1) Smiley Face

Create a new 640x480 graphics window and draw a smiley face in it. You need to create a circle for the head, two circles for the eyes, and a couple of lines for the mouth. solution

2) Getting user input

Create an infinite while loop (while True:) and inside the while loop get the user's mouse click. Draw a circle centered at the point they click.

3) Smiley Face Function

Combine the first two projects to get user mouse clicks and draw a smiley face each time the user clicks the mouse. solution