t = codesters.Teacher()
try:
params = t.get_parameters_for_function('randint')
ln_params = t.find_text("top_height")
tval1 = t.get_indent_at_line(ln_params[0][0])
tval2 = int(params[0][0])
tval2a = int(params[0][1])
except:
params = "DNE"
tval1 = "DNE"
tval2 = "DNE"
tval2a = "DNE"
# print params
# print tval2, tval1, tval2a
t1 = TestObjective()
t1.add_success(tval2 == 50 and tval2a == 300 and tval1 == 4, "Great job!")
t1.add_failure(tval2 == 1, "Did you change the first parameter in randint to 50?")
t1.add_failure(tval2a == 10, "Did you change the second parameter in randint to 300?")
t1.add_failure(tval1 != 4, "Did you unindent your random variable? It needs to be indented four spaces.")
t1.add_creative(tval2 !=1 and tval2 < 50, "Your top block's minimum height is less than 50. Creative choice!")
t1.add_creative(tval2a != 10 and tval2a > 300, "Your top block's maximum possible height is greater than 100. Creative choice!")
# 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.