Binary decision making

Binary decision making

5th Grade

10 Qs

quiz-placeholder

Similar activities

Digital Citizenship - Comprehensive Activity

Digital Citizenship - Comprehensive Activity

1st - 6th Grade

12 Qs

Scratch intro

Scratch intro

4th Grade - University

14 Qs

DigitalSkodaTahap1

DigitalSkodaTahap1

1st - 5th Grade

15 Qs

Digital Footprint

Digital Footprint

5th Grade

5 Qs

SCRATCH LỚP 5

SCRATCH LỚP 5

5th Grade

11 Qs

Robotics and AI trivia for kids

Robotics and AI trivia for kids

1st - 6th Grade

10 Qs

Know Function Inside Computer

Know Function Inside Computer

5th Grade

10 Qs

Operating System Quiz

Operating System Quiz

5th Grade

10 Qs

Binary decision making

Binary decision making

Assessment

Quiz

Information Technology (IT)

5th Grade

Hard

Created by

Alaa Mohamed

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an if-then statement in programming?

To perform a calculation

To make a decision based on a condition

To repeat a block of code

To store data

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In an if-then statement, what happens if the condition is false?

The code inside the if block is executed.

The code inside the else block is executed.

The program terminates.

Nothing happens.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an else statement in an if-then-else statement?

To provide an alternative action if the condition is true.

To provide an alternative action if the condition is false.

To repeat a block of code.

To store data.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

if x > 10 :

print ("x is greater than 10")

What will happen if x is equal to 15?

x is greater than 10" will be printed.

Nothing will be printed.

An error will occur.

The program will terminate.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

if x < 10:

print ("x is greater than 10")

else: print ("x is less than or equal to 10")

What will happen if x is equal to 5?

"x is greater than 10" will be printed.

"x is less than or equal to 10" will be printed.

Nothing will be printed.

An error will occur.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid (right) condition for an if statement?

5

hello

x > y

if x > 10

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between an if-then statement and an if-then-else statement?

An if-then statement has no condition.

An if-then-else statement has no condition.

An if-then statement executes code if the condition is true

an if-then-else statement executes code whether the condition is true or false

There is no difference between them.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?