
Python Fundamentals

Quiz
•
Computers
•
12th Grade
•
Hard
DIVYA DIVYA
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a variable and a constant in Python?
A variable can only store integers, while a constant can store any data type in Python.
A variable is a data type, while a constant is a function in Python.
A variable is defined using 'const', while a constant is defined using 'var' in Python.
A variable can be reassigned, while a constant's value cannot be changed in Python.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a variable in Python?
declare variable_name
variable = value
value = variable_name
variable_name = value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the basic data types in Python?
array
char
float
integer, float, string, boolean, list, tuple, dictionary, None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for an if statement in Python?
if (condition):
if condition:
if condition {
if condition then:
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write an if-else statement in Python?
else:
if condition:
if condition: # code block to execute if condition is true else: # code block to execute if condition is false
if condition:
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a for loop in Python?
To perform mathematical calculations
To iterate over a sequence and execute a block of code for each item in the sequence.
To create classes and objects
To handle user input
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you iterate over a list in Python?
while item in my_list:
for i in range(len(my_list)):
foreach item in my_list:
for item in my_list:
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Python List Basics

Quiz
•
12th Grade
10 questions
Python Data Types and Lists ( level easy )

Quiz
•
12th Grade
16 questions
Python U2M3 Test

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

Quiz
•
12th Grade
15 questions
PYTHON PROGRAMMING

Quiz
•
11th - 12th Grade
10 questions
9 . Lists, Tuples, Sets and Dictionary - 5

Quiz
•
12th Grade
10 questions
Fun Demo Quiz

Quiz
•
9th - 12th Grade
15 questions
AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

Quiz
•
10th - 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
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
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