AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Two languages, one plan

Week 27 · Unit 7.6: Sequencing and pattern recognition · 3 lessons
Answers are for parents and teachers.
1
Copy and complete the table.
PythonMicroPython
time.sleep(4)sleep(?)
time.sleep(0.1)sleep(?)
time.sleep(?)sleep(2500)
time.sleep(10)sleep(?)
2
Write the Python program for this flowchart, and say what it prints. Then write the MicroPython program.
Startboxes = 6pens_per_box = 12total = boxes * pens_per_boxOUTPUT totalEnd
3
Copy the table and write AND, OR or NOT for each situation. Give a reason.
SituationOperator?
1A hall light comes on if the front sensor or the back sensor sees movement?
2A toy rocket launches only when two buttons are pressed together?
3A night-light stays on unless the off button is pressed?
4
A program shows a heart for 2 seconds when A is pressed, and then clears the screen. Write a test plan with three tests, with the expected outcomes.
5
In the micro:bit program the line from microbit import * and the line total = price * 3 both contain a star. Explain what the star means in each line.