Nested if...else statements

Nested if...else statements

6th - 8th Grade

8 Qs

quiz-placeholder

Similar activities

3D Printing - BrainPOP

3D Printing - BrainPOP

6th - 8th Grade

10 Qs

Python Introduction Quiz

Python Introduction Quiz

8th - 9th Grade

12 Qs

Python Programming Basics

Python Programming Basics

7th - 11th Grade

12 Qs

Python

Python

7th - 8th Grade

10 Qs

Computer Parts

Computer Parts

7th - 8th Grade

13 Qs

1.1 part 1 Network Questions

1.1 part 1 Network Questions

8th Grade

10 Qs

Python Math

Python Math

1st - 12th Grade

10 Qs

Python Variables

Python Variables

7th - 12th Grade

10 Qs

Nested if...else statements

Nested if...else statements

Assessment

Quiz

Computers

6th - 8th Grade

Medium

Used 140+ times

FREE Resource

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