应答机

Get started with MakeCode with this 'hello, world!' program!

  • Get started
  • MakeCode
  • Algorithm
  • Code
Print lesson
  • 年龄 8+
  • 30 分钟
  • MakeCode Editor

介绍

First project using the micro:bit and the MakeCode editor. 本课程主要是介绍micro:bit。 不管是以流程图的形式还是以伪代码的形式,它都是基于一个基本的写作算法。 学生们开发他们自己的程序并在micro:bit上测试。

教学指南

打开 打开 teacher resources

课堂活动

In the MakeCode editor select the basic option from the block menu and find the “show string” block and drag onto the workspace. Place the show string block within a forever loop. If a forever loop is not on the workspace when loaded, this can be found within the basic option within the blocks as well. The show string will display the text that the user enters within the variable box.


basic.forever(() => {
    basic.showString("Hello!")
})
    

Edit the string by clicking on the word “Hello!” and typing in “Ask me a Question”.


basic.forever(() => {
    basic.showString("Ask me a Question.")
})
    

讲程序存储下载至micro:bit。

挑战

试着添加下列功能:

  • 添加yes & no 的按钮
  • 插入一个shake input(摇晃输入)
  • 添加一个记分系统

了解更多

查看“Guess the Number”(猜数字)课程来开始运用inputs(输入积木块)。

Selecting this opens external content from our support system, which adheres to their privacy policy.