Week 5

Lesson #5-1: Canvas and Drawing

Watch Video 5-1: Canvas and Drawing

Access www.codeskulptor.org

Write and Save a Canvas_and_Drawing.py file

http://www.codeskulptor.org/#examples-canvas_and_drawing.py

In the code frame = simplegui.create_frame("Canvas Example", 300, 200), how tall and how wide is the canvas? Where in the canvas is [0,200]? [300,0]?

Draw a small red circle in a larger white circle, and write bullseye.

According to the documentation, what are some other items you can draw on

your canvas. Try them out!

Lesson #5-2: String-Processing

Watch Video 5-2: String-Processing

Access www.codeskulptor.org

Write and Save a String_Processing.py file

http://www.codeskulptor.org/#examples-strings-0.py

What is the difference between int(), float(), and str()?

How could you print out the letter "m" in the string s1="game"?

What are two ways to print out the letter "e" in the string s1="game"?

How could you print out only the first three letters of the string s1="game"?

Can you create a function that converts seconds into minutes and seconds?

Lesson #5-3: Interactive Drawing

Watch Video 5-3: Interactive Drawing

Access www.codeskulptor.org

Write and Save an Interactive_Drawing.py file

http://www.codeskulptor.org/#examples-interactive_drawing.py

Using your previous function that converts seconds into minutes and seconds, create an interactive program that lets you enter any number of seconds, and it prints out the minutes and seconds on the canvas.