Micro:bit, computational thinking, flow charts and hardware

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/35

encourage image

There's no tags or description

Looks like no tags are added yet.

36 Terms

1
New cards

• Q: How do you display static text on the Micro:bit?

display.show("HELLO")

2
New cards

• Q: How do you scroll text across the Micro:bit screen?

display.scroll("HELLO")

3
New cards

• Q: How do you display a built-in image on the Micro:bit?

display.show(Image.SAD)

4
New cards

• Q: How do you create a custom image and store it in a variable?

Block = Image("00000:00000:09990:09990:00000")

5
New cards

How do you display a custom image variable on the screen?

display.show(Block)

6
New cards

• Q: How do you pause or delay code execution for two seconds?

sleep(2000)

7
New cards

• Q: How do you store a custom image using the variable name Dog?

Dog = Image("00090:09900:99909:99099:99999")

8
New cards

• Q: What does import random allow you to do?

It lets you pick an item at random from a list.

9
New cards

• Q: What does while True do in a Micro:bit program?

It forms an infinite loop that continuously checks for a condition (like a button press) and runs code when that condition is met.

10
New cards

What does a RAM do?

Temporarily stores recently used files and applications for quick access later. It is known as a primary storage.

11
New cards

What happens to the contents of the RAM when the computer is switched off?

When the computer is switched off, all the contents of the RAM are lost.

12
New cards

What does the CPU do?

Where processes such as calculating, sorting and searching take place. Whatever is done on our computers, the CPU has processed the data we use.

13
New cards

What does ROM stand for?

Read Only Memory

14
New cards

What does the hard drive do?

Used on all computers and is the main method of storing data. Very large storage capacity. Stores ALL files, software, images etc.

15
New cards

Can the hard drive store your files and software when the device is turned off?

Yes

16
New cards

What happens when your device is turned on and you open a file?

The file moves from the hard drive to the RAM.

17
New cards

What happens when you open a program on your computer?

  1. The instructions to open the program are sent to the CPU.

  2. The CPU sends a request for the program to be loaded from the hard drive to the RAM.

  3. The hard drive loads the program onto the RAM.

  4. The CPU is then ready to work with the program!


18
New cards

Where is the CPU found?

On the motherboard.

19
New cards

What is the function of the CPU?

Fetch, decode, execute instructions.

20
New cards

What does the clock do?

  • The clock provides the timing signal for the CPU

  • It dictates the speed at which the CPU processes instructions.

  • This speed is measured hertz in cycles per second, which is equal to the number of instructions per second.


21
New cards

What is the CPU speed?

How fast the CPU can process data and commands. It is measured in Hz. 1gHz = 1 billion instructions per second.

22
New cards

What do you do to get from BYTES to BITS?

Multiply by 8.

23
New cards

What is an algorithm?

A set of step by step instructions to solve a problem or perform a task. They can be used in everyday life, e.g. baking a cake.

24
New cards

What is sequencing?

The specific order in which instructions are performed in an algorithm.

25
New cards

What is iteration?

The process of looping or repeating sections of a program.

26
New cards

What does an oval represent?

Name : Start/stop. Usage : The beginning and end points of the flow diagram.

27
New cards

What does a rectangle represent?

Name : Process. Usage : An instruction or command.

28
New cards

What does a diamond represent?

Name : Decision. Usage : A decision, either yes or no.

29
New cards

What does a parallelogram represent?

Name : Input and output. Usage : An input is data received by a computer. An output is a signal or data sent from a computer.

30
New cards

What do the arrows represent?

Name : Direction of flow. Usage : Connects the symbols. Shows the direction of the flow of instructions.

31
New cards

What is selection?

Selection determines which path a program takes when it is running.

32
New cards

What is the function of the CPU?

To fetch, decode and execute instructions

33
New cards

What is an integer data type?

Integer is a data type for whole numbers (positive, negative or zero), used for counting or calculations.

34
New cards

What is a string data type?

String is a data type for a sequence of characters, such as text, enclosed in quotation marks.

35
New cards

Code for a square with a red line and brown fill colour.

import turtle

turtle.fillcolor(“Brown”)

turtle.begin_fill()

turtle.pencolor(“Red”)

turtle.forward (100)

turtle.right (90)

turtle.forward (100)

turtle.right (90)

turtle.forward (100)

turtle.right (90)

turtle.forward (100)

turtle.end_fill()

36
New cards

Code for a square without having to repeat lines of code.

for i in range(4):

turtle.forward(100)

turtle.right(90)