Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

self - check 5.7 cs - 04b: exploring computer science 1 distributive 4t…

Question

self - check 5.7
cs - 04b: exploring computer science 1 distributive 4th / unit 5: what more can i do with basic programming skills? (weeks 8 - 11) / lesson 5.7 programming: timers (week 10)

  1. which of the following blocks are necessary to make a timer?
  • sound blocks (play sound, set volume, etc.)
  • control blocks (repeat, if/else, etc.)
  • operators (+, -, pick random, etc.)
  • sensing blocks (touching, ask, etc.)
  1. jill is creating a time - based game which was only supposed to run for two minutes and then end the game. which of the following codes should she not use to set up her timer?
  • change timer by 1
  • change timer by - 1
  • set timer to 120
  • stop all

Explanation:

Brief Explanations
  1. For a timer, you need to control the flow of counting/triggering actions over time, which relies on control blocks like repeat loops or conditionals to manage the timer's operation. Other block types are not core to timer functionality.
  2. A 2-minute game (120 seconds) can use a countdown (change timer by -1 starting from 120) or count-up (change timer by 1 until reaching 120). set timer to 120 initializes the countdown value. stop all ends the game but does not set up the timer itself, so it should not be used for timer setup.

Answer:

  1. Control blocks (repeat, if/else, etc.)
  2. stop all