stage.set_background_color("lightblue")
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_left(45)
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
t = codesters.Teacher()
spins = t.get_parameters_for_function("turn_right")
try:
tval1 = spins[0][0]
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == "45", "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add a Turn Right command?")
t1.add_failure(tval1 != "45" and tval1 != "DNE", "Is the integer in your Turn Right command 45?")
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)