Nested if...else statements

Nested if...else statements

6th - 8th Grade

8 Qs

quiz-placeholder

Similar activities

Java Printing Quiz

Java Printing Quiz

8th Grade

11 Qs

1.5 word

1.5 word

KG - 12th Grade

10 Qs

Mario

Mario

2nd - 6th Grade

13 Qs

Python

Python

7th - 8th Grade

12 Qs

MOAC Excel 2016 Lesson 03

MOAC Excel 2016 Lesson 03

8th - 12th Grade

10 Qs

Y9 Intro to Python

Y9 Intro to Python

8th Grade

10 Qs

8th Data Science

8th Data Science

8th Grade

10 Qs

PCEP Prep Day 1

PCEP Prep Day 1

6th - 8th Grade

10 Qs

Nested if...else statements

Nested if...else statements

Assessment

Quiz

Computers

6th - 8th Grade

Medium

Used 141+ 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