Last Updated: January 3, 2026
32 quizzes
Complete the code so it displays the type of the value stored in value_info
print(type(value_info.))Click an option to fill the blank:
Complete the code so it prints how many characters are in course_title
print(len())Click an option to fill the blank:
Complete the code so the expression checks whether value is not equal to 0
is_non_zero = (value 0)Click an option to fill the blank:
Which statement best describes Python as a language?
Who created Python?
What does it mean that Python is dynamically typed?
Which version introduced major, intentionally incompatible changes to clean up Python's design?
Which feature of Python makes it especially suitable for rapid prototyping?
Which field is Python particularly strong in compared to JavaScript?
What is the main role of pip in Python development?
What is the typical file extension for a Python source file?
In a Python script, what does a line starting with # represent?
Which Python interpreter implementation is the reference implementation written in C?
In interactive Python mode, what typically indicates the interpreter is ready for a new statement?
Why is Python often considered beginner-friendly?
Order the steps to create and run a simple Python script that prints a message.
Drag and drop to reorder, or use the arrows.
Order the steps describing how the Python interpreter executes your script.
Drag and drop to reorder, or use the arrows.
What is the output of this code, illustrating dynamic typing?
1label = "Version"
2label = label + " 3"
3print(label)What is the output of this code showing list comprehension usage?
1values = [1, 2, 3]
2squares = [number * number for number in values]
3print(squares)What is the output of this code related to object-oriented programming?
1class Course:
2 def __init__(self, title):
3 self.title = title
4
5python_course = Course("Intro to Python")
6print(python_course.title)What is the output of this code that uses the math library?
1import math
2angle = math.pi / 2
3result = round(math.sin(angle), 2)
4print(result)What is the output of this code illustrating interpreter errors at runtime?
1def safe_divide(a, b):
2 if b == 0:
3 return "cannot divide by zero"
4 return a / b
5
6print(safe_divide(10, 0))Find the bug in this code that is meant to print a welcome message only for version 3.
Click on the line(s) that contain the bug.
version = 3if version = 3: print("Welcome to Python 3 course")else: print("Different version")Find the bug in this code that intends to show the installed Python packages.
Click on the line(s) that contain the bug.
def show_packages(): import pip packages = pip.list() print(packages)Match each Python implementation with its typical host platform or feature.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each Python feature with its description.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Complete the code to print a greeting from a first Python program.
course_title = (course_title)Click an option to fill blank 1:
Complete the code to import the math module and print the square root of 16.
import result = .(16)print(result)Click an option to fill blank 1:
Complete the code to create a small history dictionary for Python.
python_history = { "creator": , "first_release": }print(python_history["creator"], python_history["first_release"])Click an option to fill blank 1:
Complete the code to compare Python with another language in a simple message.
language_a = "Python"language_b = comparison = f"{language_a} vs {language_b}"(comparison)Click an option to fill blank 1:
Click the line that actually executes the function using the Python interpreter.
Click on the line to select.
def greet(name): message = f"Hello, {name}!" return message print(greet("Student"))Click the line where dynamic typing changes the type stored in data.
Click on the line to select.
data = 10print(type(data))data = "ten"print(type(data))