Answering Machine
Get started with MakeCode with this 'hello, world!' program!
Bevezetés
First project using the micro:bit and the MakeCode editor. This lesson is an introduction to the micro:bit. Focuses upon a basic written algorithm, either in a flowchart or pseudocode. Students develop their own program and test on the micro:bit.
Teacher Guide
Open
Activity
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.")
})
Save the project and download to the micro:bit.
Challenge
Try to add the following functionality:
- Adding yes & no buttons
- Introducing a shake input
- Add a scoring system
Learn More
Check out the 'Guess the Number' lesson to start using inputs.