Nested if...else statements

Nested if...else statements

6th - 8th Grade

8 Qs

quiz-placeholder

Similar activities

Cascading Style Sheets

Cascading Style Sheets

8th - 12th Grade

11 Qs

Technology Week HTG Quiz - Monday

Technology Week HTG Quiz - Monday

7th - 12th Grade

10 Qs

Recording Software Button Identification Quiz

Recording Software Button Identification Quiz

8th Grade - University

10 Qs

Tin 6a4

Tin 6a4

1st - 10th Grade

10 Qs

Python web level 1

Python web level 1

8th Grade

10 Qs

ETWINNING SID EVENT 24

ETWINNING SID EVENT 24

1st - 12th Grade

10 Qs

Working with tables

Working with tables

5th - 12th Grade

10 Qs

Nested if...else statements

Nested if...else statements

Assessment

Quiz

Computers

6th - 8th Grade

Practice Problem

Medium

Used 143+ times

FREE Resource

AI

Enhance your content in a minute

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

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 10                           . 
if number_of_coins == 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins == 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 6                           . 
if number_of_coins == 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins == 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 1                           . 
if number_of_coins == 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins == 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 1                           . 
if number_of_coins < 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins == 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 7                           . 
if number_of_coins > 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins < 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 6                           . 
if number_of_coins > 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins < 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 3                           . 
if number_of_coins > 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins < 10:
.      print("You are rich")
else:                                               .
.  print("Get a job!")

You can buy some gum
You are rich
Get a job!
You are rich
Get a job!

8.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result?
number_of_coins = 2                           . 
if number_of_coins > 6:                       .
.          print("You can buy some gum")
else:                                                                      .
if number_of_coins < 10:
.      print("You are rich")
. print("Get a job!")

You can buy some gum
You are rich
Get a job!
Nothing prints