stage.set_background("flowers")
sprite = codesters.Sprite("kitten")
sprite.flip_up_down()
sprite.flip_up_down()
t = codesters.Teacher()
try:
tval2 = int(stage.get_wait_time())
except:
tval2 = "DNE"
try:
parama = t.find_function('wait')
tval3a = parama[0][0]
paramb = t.find_function('flip_up_down')
tval3b = [paramb[0][0], paramb[1][0]]
except:
tval3a = "DNE"
tval3b = "DNE"
t2 = TestObjective()
t2.add_success(tval2 == 1, "Great Job debugging the program!")
t2.add_failure(tval2 == "DNE", "Did you add a wait command?")
t2.add_failure(tval2 == 0, "Did you add a wait command?")
t2.add_creative(tval2 != 1 and tval2 != "DNE", "Creative Choice!")
t3 = TestObjective()
t3.add_success(tval3a > tval3b[0] and tval3a < tval3b[1] , "Great Job debugging the program!")
t3.add_failure(tval3a < tval3b[0], "Did you put your wait command between your flip commands?")
t3.add_failure(tval3a > tval3b[1], "Did you put your wait command between your flip commands?")
t3.add_failure(tval3a == "DNE", "Did you delete a flip command?")
tester = TestManager()
tester.add_test_list([t2, t3])
tester.run_tests()
tester.display_first_feedback()