microbit = codesters.Microbit()
microbit.show_string("hello")
data = microbit.get_temp()
microbit.show_number(data)
data_list = []
time_list = []
my_display = codesters.ScatterPlot(time_list, data_list)
time = 0
def interval():
temp = microbit.get_temp()
stage.event_interval(interval, 2)
t = codesters.Teacher()
get_temps = t.find_function("get_temp")
try:
tval1 = get_temps[1][1].replace(" ", "")
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success("data=" in tval1, "Great job!")
t1.add_failure("temp=" in tval1, "Did you change the variable name from temp to data?")
t1.add_failure(tval1 == "DNE", "Did you delete the .get_temp() command inside your interval event?")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()