stage.set_background("concert")
sprite = codesters.Sprite("person1")
sprite.move_down(100)
sprite.set_speed(3)
sprite.flip_up_down()
sprite.move_right(150)
sprite.move_left(200)
sprite.flip_up_down()
sprite.turn_left(360)
sprite.flip_right_left()
stage.wait(1)
sprite.flip_right_left()
stage.wait(1)
sprite.flip_right_left()
stage.wait(1)
sprite.flip_right_left()
stage.wait(1)
sprite.flip_right_left()
stage.wait(1)
sprite.flip_right_left()
stage.wait(1)
t = codesters.Teacher()
try:
params = t.find_block('def')
tval1A = params[0][1]
except:
tval1A = "DNE"
try:
params2 = t.get_parameters_for_function('event_key')
tval1B = params2[0][0]
except:
tval1B = "DNE"
t1 = TestObjective()
t1.add_success('enter_key' in tval1A and tval1B == '"enter"', "Great Job! Be sure to press enter!")
t1.add_failure(tval1A == "DNE", "Did you add Enter Key?")
t1.add_failure(tval1B == "DNE", "Did you delete the last line of Enter Key?")
t1.add_failure(tval1B == None, "Did you delete the line that comes with Enter Key?")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)