预览:让我们看一个您今天将要创建的程序的示例!

  • 点击运行以查看示例。观察图表一分钟,看看会发生什么!
  • 查看代码后,单击提交接下来继续。

To navigate the page using the TAB key, first press ESC to exit the code editor.

microbit = codesters.Microbit() time_list = [] data_list = [] my_display = codesters.ScatterPlot(time_list, data_list) time = 0 def interval(): global time data = microbit.get_temp() data_list.append(data) time_list.append(time) my_display.update(time_list, data_list) time += 1 my_display.set_title("Time vs. Temperature") stage.event_interval(interval, 1)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)