Search Header Logo
Y9: Microbit Array

Y9: Microbit Array

Assessment

Presentation

Computers

10th Grade

Practice Problem

Easy

Created by

David Kang

Used 2+ times

FREE Resource

18 Slides • 23 Questions

1

Arrays and Microbits

2

Open Ended

Could you try to write as many colours you know.

3

Either you can recalled more than 3 or 5 colours.

These are grouped as colours or list of colours.

4

Open Ended

List out all types of transportations you've used or now.

5

Multiple Choice

Question image

What type of list can you make from this?

1

Colours

2

Sizes

3

Length

4

Numbers

6

Multiple Choice

Question image

What type of list can you make from this?

1

Colour

2

Size

3

Length

4

Number

7

Multiple Choice

Question image

What type of list can you make from this?

1

flavour

2

Size

3

Length

4

Number

8

Multiple Choice

Question image

What type of list can you make from this?

1

flavour

2

Size

3

pattern

4

Number

9

Multiple Choice

Question image

What type of list can you make from this?

1

flavour

2

Size

3

pattern

4

Number

10

​List

​a number of connected items or names written or printed consecutively, typically one below the other.

11

​List

A "list" is like a line-up of words or things. Imagine you are playing with your toys and you line them up one by one. This is a list, but instead of toys, you write words down.

For example, you want to remember what to pack in your school bag. You might write:

  1. Books

  2. Pencil case

  3. Lunchbox

  4. Water bottle

12

​List = Array

13

​List = Array

an impressive display or range of a particular type of thing.

14

Array

In computer science, an "array" is a way of storing many pieces of information (like numbers or words) in a single box. You can imagine it like a long train, where each car of the train can hold one piece of information.

If you have a train with 10 cars, you can store 10 pieces of information in it. This is an "array" in programming

15

Array

In computer science, an "array" is a way of storing many pieces of information (like numbers or words) in a single box. You can imagine it like a long train, where each car of the train can hold one piece of information.

If you have a train with 10 cars, you can store 10 pieces of information in it. This is an "array" in programming

16

Multiple Choice

What is an array in computer science?

1

A type of computer hardware

2

A way of storing many pieces of information in one place

3

A program used for creating digital art

4

A single piece of data

17

Multiple Choice

How does an array in computer science work?

1

It makes the computer run faster

2

It holds only one piece of information at a time

3

It stores different pieces of information in separate slots, like a list

4

It is used to turn the computer on and off

18

Multiple Choice

In programming, if we want to store 5 different numbers and retrieve them easily, what should we use?

1

A loop

2

A function

3

A bug

4

An array

19

media

20

Multiple Choice

Which of the following best describes an 'integer' in computer science?

1

A type of computer software

2

A decimal number like 2.5 or 3.14

3

A whole number that can be positive, negative, or zero, but without any decimal points

4

A special command that tells the computer to start a program

21

Multiple Choice

In computer science, what does the term 'string' refer to?

1

A sequence of characters, like a word or a sentence

2

A type of data that only contains numbers

3

A cord used to connect different computer parts

4

A process to shut down the computer

22

media

​Remember that numbers can be both integer or just string text.

23

media

​In computer programme, the first item starts with " 0 "

24

media
media

​A

B

25

Labelling

These are same instructions but difference in terms of computer language. Could you label the correct language?

Drag labels to their correct position on the image
Microbit Python
Pseudocode

26

media
media

​Pseudocode

Microbit Python

27

Multiple Choice

What is pseudocode in computer science?

1

A type of harmful computer virus

2

A simple way of writing out code that humans can understand, used for planning a program

3

A software used to design computer games

4

The language that computers use to talk to each other

28

Multiple Choice

Question image

What does the given pseudocode do when the micro:bit is shaken?

1

It shows a random picture on the screen.

2

It clears the screen and does nothing else.

3

It outputs a random number from 1 to 6, waits for half a second, and then clears the screen.

4

It stops the program immediately.

29

Open Ended

Question image

Explain in your own words, what is the outcome of this pseudocode instruction?

30

media

​The pseudocode you saw just now can be rewritten in Microbit in this way.

31

media

But first let's dissect the code..

32

Multiple Choice

Question image

What is the function of the following lines in the given Python code?

1

They tell the computer to create random numbers.

2

They tell the computer to import everything from the 'microbit' library and the 'random' library for use in the program.

3

They display a random number on the screen.

4

They put the microbit to sleep for a random amount of time.

33

Multiple Choice

Question image

What does the following line of code do in Python?

1

It creates a random number between 1 and 6.

2

It creates an array (list in Python) named 'numbers', which holds the values 1, 2, 3, 4, 5, and 6.

3

It shows the numbers 1 to 6 on the screen.

4

It multiplies the numbers 1 to 6.

34

Multiple Choice

Question image

What does the following line of code do in Python?

1

It runs the following block of code just once.

2

It runs the following block of code only if a condition is met.

3

It creates an infinite loop, running the following block of code forever (or until the program is stopped).

4

It stops the program from running.

35

Multiple Choice

Question image

What does the following line of code do in Python?

1

It makes the micro:bit shake.

2

It checks if the 'shake' gesture was detected on the micro:bit.

3

It generates a random number.

4

It shows a message on the micro:bit screen.

36

Multiple Choice

Question image

What does the following line of code do in Python?

1

It randomly rearranges the numbers in the array.

2

It adds a random number between 0 and 5 to the 'numbers' array.

3

It displays a random number between 0 and 5 on the micro:bit screen.

4

It selects a random number from the 'numbers' array and displays it on the micro:bit screen.

37

Multiple Choice

Question image

What does the following line of code do in Python?

1

It causes the program to stop running for 2000 seconds.

2

It makes the micro:bit display the number 2000.

3

It causes the program to pause for 2000 milliseconds (or 2 seconds) before continuing.

4

It increases the speed of the program for 2000 seconds.

38

Multiple Choice

Question image

What does the following line of code do in Python?

1

It turns off the micro:bit.

2

It erases all the code in the program.

3

It clears the micro:bit's display, turning off all the LEDs.

4

It creates a new display for the micro:bit.

39

You watch the video to see how I did it.

media
media

​If you test the shake simulator, you can see random numbers will appear.

40

media
media

​Based on this Pseudocode, could you try to modify your code so that it show different groups in the microbit when shaken?

​Make sure to submit your work as screenshot and upload in Google Classroom.

41

Once you've completed, you may use the extra time to work on your Python Project on your text-based RPG Game

Arrays and Microbits

Show answer

Auto Play

Slide 1 / 41

SLIDE