CSC 141 / QUIZ 1 / UNGRADED PRACTICE

A little practice before Tuesday.

Twelve short questions to help you prepare for Quiz 1. Predict first, choose an answer, then read the explanation.

Quiz: Tuesday, September 15, 2026, 11:00–11:15 AM.
Classes 1–5. Ten multiple-choice questions on basic concepts and short code traces.

These are different questions from the graded quiz. Practice as often as you like. No name, student ID, or submission is required; this page does not record a grade.

Course home · PA1 step-by-step guide

What to review

For each snippet, track the values, check conditions from top to bottom, and write the exact output before running it. The quiz will not ask you to write a complete program.

01 The user types 21. What is the type stored in text?
text = input("Number: ")
02 Which conversion is appropriate for a whole-number ticket count?
03 What does this program print?
points = 5
points = points + 2
print(points)
04 What does this program print?
print(17 // 5, 17 % 5)
05 Which expression is True when level is exactly 8?
06 What value does the final expression produce?
age = 5
age >= 4 and age >= 10
07 What does this program print?
ready = True
if ready:
    print("Ready")
else:
    print("Wait")
08 What does this program print?
size = 12
if size >= 20:
    print("Large")
elif size >= 10:
    print("Medium")
else:
    print("Small")
09 What does this program print?
open_now = False
has_ticket = True
if open_now:
    if has_ticket:
        print("Park")
    else:
        print("Buy ticket")
else:
    print("Come back")
10 What does this program print?
price = 3.2
print(f"{price:.2f}")
11 Which is the best first step before writing a new program?
12 A rule uses weight <= 20. Which inputs best test its boundary?