Part 2 - Python CodeHS Standards: Number Guessing Game

Quiz
•
Computers
•
10th Grade
•
Hard
PRESTON COLE
Used 6+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the context of a number guessing game, examine the following block of code. What will be the output if guess is "15.0" and number is 15?
Correct Guess!
Incorrect Guess!
Syntax Error
TypeError
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider a guessing game where number is a randomly selected integer between 1 and 100, and guesses is a list of guessed numbers. Which of the following snippets will efficiently check if the most recent guess is correct?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a guessing game, you want to limit the number of guesses to 3. Which of the following loop structures is the best way to achieve this?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Analyze the following code snippet in the context of a number-guessing game. What type of error will the below code raise?
IndexError
TypeError
SyntaxError
KeyError
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a guessing game, what will the following code snippet output if guess is '15' and number is 15?
Correct!
Incorrect!
Syntax Error
AttributeError
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a number-guessing game, how can you ensure that the variable guess is of type int before processing it?
assert type(guess) == int
if isinstance(guess, int): pass
try: guess = int(guess)
guess = int(input())
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the code below, which is intended to iterate through a 2D list of guesses, how would you access the second element from the third sublist in guesses_2D?
guesses_2D[2][1]
guesses_2D[3][2]
guesses_2D[2][2]
guesses_2D[1][2]
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
String Manipulation and Validation

Quiz
•
10th Grade
15 questions
Translators

Quiz
•
9th - 12th Grade
10 questions
Data Security

Quiz
•
5th - 10th Grade
12 questions
Errors in Python

Quiz
•
9th - 12th Grade
15 questions
Number Guessing Game

Quiz
•
10th Grade
12 questions
Iteration - While Loop

Quiz
•
8th - 12th Grade
10 questions
Python Loops

Quiz
•
9th - 12th Grade
15 questions
Computer & Internet Safety

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade