try:
tval1 = sam.get_x()
tval2 = sam.get_y()
tval3 = sam.get_image_name()
except:
tval1 = "DNE"
tval2 = "DNE"
tval3 = "DNE"
try:
tval4 = smokey.get_x()
tval5 = smokey.get_y()
tval6 = smokey.get_image_name()
except:
tval4 = "DNE"
tval5 = "DNE"
tval6 = "DNE"
t1 = TestObjective()
t1.add_success(tval3 == "toucan", "Great job debugging the program!")
t1.add_failure(tval3 == "DNE", 'Did you name the sprite with the "toucan" image sam?')
t1.add_failure(tval3 == "panther", 'Oops! Try renaming the sprite with the "toucan" image sam')
t2 = TestObjective()
t2.add_success(tval6 == "panther", "Great job debugging the program!")
t2.add_failure(tval6 == "DNE", 'Did you name the sprite with the "panther" image smokey?')
t2.add_failure(tval6 == "toucan", 'Oops! Try renaming the sprite with the "panther" image smokey')
t3 = TestObjective()
t3.add_success(tval1 == -150 and tval2 == -50, "Great job debugging the program!")
t3.add_failure(tval1 == 150 and tval2 == -50, "Oops! Try using sam's name in the first glide to command.")
t3.add_failure(tval1 != -150 or tval2 != -50, "Oops! Try placing sam under where it says Bird Sprite at (-150, -50)")
t4 = TestObjective()
t4.add_success(tval4 == 150 and tval5 == -50, "Great job debugging the program.")
t4.add_failure(tval4 == -150 and tval2 == -50, "Oops! Try using smokey's name in the second glide to command.")
t4.add_failure(tval4 != 150 or tval2 != -50, "Oops! Try placing smokey under where is says Panther Sprite on the stage at (150, -50).")
tester = TestManager()
tester.add_test_list([t1, t2, t3, t4])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.