Micro:bit Variables and Selection Quiz
13 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What formula is used for converting Celsius to Fahrenheit?

  • °F = 1.8°C + 32 (correct)
  • °F = 2°C + 32
  • °F = 1.8°C - 32
  • °F = 0.5556°C + 32
  • What is essential to do before using radio channels?

  • Set the radio group and channel (correct)
  • Activate all frequencies
  • Calibrate the sensors
  • Restrict access to only one user
  • What should you do to determine the effective range of the radio?

  • Use a formula for range calculation.
  • Estimate to the nearest 50cm. (correct)
  • Count the number of users.
  • Measure in inches.
  • When creating a radio channel, how many unique channels can you choose from?

    <p>1 – 255</p> Signup and view all the answers

    What is a common tool for sending and receiving over a radio channel?

    <p>An emulator</p> Signup and view all the answers

    What is a key characteristic of variables in programming?

    <p>They can change values during program execution.</p> Signup and view all the answers

    Which of the following statements is true about the use of names for variables?

    <p>Variable names should be meaningful for clarity.</p> Signup and view all the answers

    In an if/else statement, which condition is evaluated first?

    <p>The if condition.</p> Signup and view all the answers

    What is the primary role of inputs in a micro:bit program?

    <p>To change the output of the program during execution.</p> Signup and view all the answers

    How does a micro:bit's light sensor function?

    <p>It converts light energy into an electrical signal.</p> Signup and view all the answers

    What is the purpose of Analogue to Digital Conversion (ADC) in sensing?

    <p>To convert physical signals into numerical measurements.</p> Signup and view all the answers

    If a microphone sensor can detect 4 different sound levels using 2 wires, how many can it detect with 3 wires?

    <p>8</p> Signup and view all the answers

    What happens to the else and else if conditions within an if/else statement when the if condition is true?

    <p>They are ignored.</p> Signup and view all the answers

    Study Notes

    Micro:bit Revision Guide for Assessment

    • The assessment includes a practical element requiring coding tasks.
    • Refer to your OneNote for specific tasks.
    • Complete tasks in the makecode editor.

    Variables

    • Variables are assigned a value, given a descriptive name, and can store numbers or text.
    • Variables can change throughout a program.

    Using Variables

    • Variables can be assigned a starting value.
    • The value can be accessed and displayed within a loop.
    • Variable names should be meaningful for better understanding.

    Selection (if/else)

    • Selection uses if/else if/else statements.
    • The first true condition activates the associated block of code.
    • Else if and else conditions are skipped if a preceding condition is true.
    • Conditions must evaluate to true or false.

    Testing Multiple Conditions

    • Multiple conditions can be combined in an ’if’ statement using the ‘and’ operator.

    Inputs

    • Inputs change a program's execution (e.g., button presses, sensor readings).
    • Inputs affect program output.
    • Programs actively listen for input changes.

    Inputs: Sensors

    • Sensors transform natural phenomena into numerical electrical signals.
    • Sensor data range is typically 0-255 for the micro:bit.
    • Sensors are used to measure phenomena such as light level or sound intensity.
    • Data is collected/analysed using the input library.

    Sensing the Real World

    • Light sensors convert light energy into electrical signals.
    • Analog to Digital Conversion (ADC): Translates physical levels into numbers.

    Sound Levels

    • Computers represent sound levels with numbers.
    • Increasing wires connected to the microphone increase the level of detected sound wave amplitudes.

    Math

    • Ensure you are proficient with numerical calculations related to your sensor data.

    Converting Celsius to Fahrenheit

    • The formula to convert Celsius to Fahrenheit is: °F = 1.8°C + 32

    Radio

    • Learn how to create and use radio channels on the micro:bit.
    • Emulators are helpful as tools.
    • Refer to accompanying slides and tasks in OneNote.

    Different Radio Channels

    • Radio channels rely on different frequencies.
    • Setting the same radio group makes them use the same frequency.
    • Channels range from 1 to 255.

    Sending and Receiving Data

    • Set the radio channel and sending of data (e.g., button presses).
    • Indicate receipt of data and display it (e.g., on screen).

    Radio Range

    • Determine the range of the micro-bit's radio transmission/reception (approximately 50cm).

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    Test your knowledge on using variables and selection statements in Micro:bit programming. This quiz covers variable assignments, meaningful names, and the if/else structure essential for coding tasks. Prepare for your assessment by mastering these concepts.

    More Like This

    Use Quizgecko on...
    Browser
    Browser