t = codesters.Teacher()
try:
param = t.find_function('flip_right_left')
tval1 = len(param)
except:
tval1 = "DNE"
try:
param2 = t.get_parameters_for_function('wait')
tval2 = param2[4]
except:
tval2 = "DNE"
try:
param3 = t.get_parameters_for_function('wait')
tval3 = param3[5]
except:
tval3 = "DNE"
# print param
#print tval2
#print tval3
#print param3
t1 = TestObjective()
t1.add_success(tval1 == 4, "Great Job!")
t1.add_failure(tval1 == 2, "Did you add two more flip commands?")
t1.add_creative(tval1 > 4, "That's a lot of flips!")
t1.add_failure(tval1 == "DNE", "Did you delete the sprite?")
t2 = TestObjective()
t2.add_success('1' in tval2, "Great job!")
t2.add_failure(tval2 == "DNE", "Did you add two more Wait commands?")
t2.add_failure('2' in tval2, "Did you change the number in your first Wait command?")
t3 = TestObjective()
t3.add_success('1' in tval3, "Great job!")
t3.add_failure(tval3 == "DNE", "Did you add two more Flip commands?")
t3.add_failure('2' in tval3, "Did you change the number in your second Wait command?")
tester = TestManager()
tester.add_test_list([t1, t2, t3])
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.