Nested if...else statements

Nested if...else statements

6th - 8th Grade

8 Qs

quiz-placeholder

Similar activities

Python Basics Quiz

Python Basics Quiz

6th Grade

8 Qs

Vào/ra dữ liệu từ thiết bị chuẩn

Vào/ra dữ liệu từ thiết bị chuẩn

6th - 8th Grade

11 Qs

Introduction to Python

Introduction to Python

6th Grade

10 Qs

THCS TAM HÒA - LỚP 7 - BÀI 7: Trình bày và in trang tính

THCS TAM HÒA - LỚP 7 - BÀI 7: Trình bày và in trang tính

6th - 7th Grade

10 Qs

6 class

6 class

6th Grade

10 Qs

CodeHS Python Variables

CodeHS Python Variables

7th - 12th Grade

10 Qs

mario

mario

6th Grade

13 Qs

Python variables

Python variables

6th - 8th Grade

8 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