stage.set_background("winter")
sprite = codesters.Sprite("person12")
sprite.go_to(-125, -150)
frosty = codesters.Sprite("snowman")
frosty.go_to(100, -125)
snow = codesters.Sprite("snowflake3")
snow.go_to(100, 75)
greeting = codesters.Text("Happy Holidays!")
greeting.go_to(0, 200)
greeting.set_color("yellow")
def click(sprite):
sprite.say("I hope your holidays are great!")
# add other actions...
sprite.event_click(click)
t = codesters.Teacher()
try:
params = t.find_function('turn_left')
tval1a = params[0][1].lower()
tval1b = t.get_indent_at_line(params[0][0])
except:
tval1a = "DNE"
tval1b = "DNE"
t1 = TestObjective()
t1.add_success("sprite" in tval1a and tval1b == 4, "Great job!")
t1.add_failure(tval1a == "DNE" or tval1b == "DNE", "Did you add a Turn Left command to the click event?")
t1.add_failure(tval1b != 4, "Make sure your Turn Left command is indented four spaces inside the Click event.")
t2 = TestObjective()
t2.add_success("360" in tval1a, "Great job!")
t2.add_failure("90" in tval1a, "Did you change the number of degrees the sprite turns?")
t2.add_failure(tval1a == "DNE", "Did you add a Turn Left command to your Click event?")
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()