Decision-Making in Programming

Decision-Making in Programming

Assessment

Passage

Science

9th - 12th Grade

Hard

Created by

Rafael Guzman

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of conditional statements in programming?

To execute different actions based on varying inputs

To store data in variables

To create loops for repetitive tasks

To define functions

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a conditional statement in JavaScript?

if

else

elif

switch

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, what is the purpose of the 'elif' statement?

To execute a block of code if the initial 'if' condition is false

To execute a block of code if the 'if' condition is true

To end a loop

To define a function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do predicates return in Snap! programming language?

Boolean values

Integer values

String values

Floating-point values

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operators are used in both JavaScript and Snap! to compare values?

Relational operators like =, >, <

Arithmetic operators like +, -

Assignment operators like =, +=

Bitwise operators like &, |