t = codesters.Teacher()
try:
params = t.find_text('set_gravity_off')
tval1 = t.get_indent_at_line(params[0][0])
tval2 = params[0][1]
except:
params = "DNE"
tval1 = "DNE"
tval2 = "DNE"
# print params
# print tval2, tval1, tval2a
t1 = TestObjective()
t1.add_success('top_block' in tval2 and tval1 == 4, "Great job!")
t1.add_failure(tval1 == "DNE" or tval2 == "DNE", "Did you turn off gravity for the rectangle?")
t1.add_failure(tval1 != 4, "Make sure the command is indented four spaces to be inside the interval event.")
t1.add_failure('top_block' not in tval2 or 'sprite' in tval2, "Did you change the name in front of Set Gravity Off to top_block?")
# ds1 = codesters.Display(tval2)
tester = TestManager()
tester.add_test_list([t1])
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.