# # Draw music notes on the screen using functions. # from SimpleGraphics import * # Draw a note on the screen that includes a flag. def drawNoteFlag(x, y, r=0, g=0, b=0): drawNote(x, y, r, g, b) curve(x+10, y-50, x+10, y-40, x+25, y-30, x+20, y-20) # Draw a note on the screen. def drawNote(x, y, r=0, g=0, b=0): setColor(r, g, b) ellipse(x-10, y-5, 20, 10) line(x+10, y, x+10, y-50) # Draw five notes with different positions and colors. drawNoteFlag(100, 100, 255) drawNote(150, 80, g=255) drawNoteFlag(200, 110, b=255) drawNote(250, 100) drawNoteFlag(300, 110)