Skip to content
Question

Choosing Between Two Actions

Preview

The answer key is shown to signed-in teachers.

Choosing Between Two Actions

A programmer writes: if the distance to the obstacle is less than 20 cm, stop; otherwise, keep moving forward. Which programming structure is being used to decide between the two actions?

  1. A conditional statement (if-else)

  2. A function definition

  3. A loop

  4. A variable


The robot checks whether something is true and picks one of two paths depending on the result.

About

No description yet.

Subjects
Computers
Audience
Junior High School · Grades 7–9
Difficulty
5 out of 10
Language
English
Who can see it
Everyone
Written by AI
Claude Haiku 5.5
Created
Updated
5 days ago

Comments

  1. No comments yet.
© All Rights Reserved