stage.set_background_color("lightblue")
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 100, 50, "gold")
t = codesters.Teacher()
params = t.get_parameters_for_function("Rectangle")
try:
tval1 = params[0][2]
except:
tval1 = "DNE"
t1 = TestObjective()
if tval1 == "DNE":
t1.add_failure(tval1 == "DNE", "Did you delete the Rectangle tool?")
else:
tval1 = int(tval1)
t1.add_success(tval1 == 700, "Great job!")
t1.add_failure(tval1 == 100, "Did you change the width parameter to 700?")
t1.add_failure(tval1 <700, "Too narrow! Try making the stripe wider.")
t1.add_failure(tval1 > 750, "Too thick! Try making the stripe narrower.")
t1.add_creative(tval1 >700 and tval1 <= 750, "That's a good width too!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()