stage.set_background("schoolentrance")
sprite = codesters.Sprite("person10")
try:
tval1 = sprite.get_x()
tval2 = sprite.get_y()
except:
tval1 = "DNE"
tval2 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == -125 and tval2 == -100, "Great job!")
t1.add_failure(tval1 == "DNE", "Oops! Did you delete yor sprite?")
t1.add_failure(tval1 == 0, "Did you add a Go To command?")
t1.add_failure(tval1 ==-100, "Did you change the number in the Go To command?")
t1.add_failure(tval1 > -50, "Try to keep your sprite closer to the left side of the screen.")
t1.add_failure(tval1 < -250, "Oops! You moved your sprite off the stage!")
t1.add_failure(tval2 != -100, "Did you change the y-coordinate to -100?")
t1.add_creative(tval1 != -125 and tval1 < -50 and tval1 > -250, "That's a good place, too!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Enviar Trabajo
-
Actividad Siguiente
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)