Nested if...else statements

Nested if...else statements

6th - 8th Grade

8 Qs

quiz-placeholder

Similar activities

Year 7 Python

Year 7 Python

7th Grade

12 Qs

Python Programming Basics

Python Programming Basics

7th - 11th Grade

12 Qs

Python

Python

7th - 8th Grade

13 Qs

Python (Selection)

Python (Selection)

8th - 10th Grade

13 Qs

Python for Class 7

Python for Class 7

7th - 8th Grade

11 Qs

Python Basic

Python Basic

6th - 8th Grade

10 Qs

3D Printing

3D Printing

6th Grade

10 Qs

Python Inputs

Python Inputs

7th - 8th 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