
Python Fundamentals
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
DIVYA DIVYA
Used 2+ times
FREE Resource
Enhance your content in a minute
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:
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
10 questions
ICT as Social Change
Quiz
•
12th Grade
10 questions
การสร้างสื่อดิจิตอล Quiz
Quiz
•
9th - 12th Grade
10 questions
HTML & Google Site Seatwork
Quiz
•
12th Grade
15 questions
1.1 Computer Systems Essential Knowledge
Quiz
•
9th - 12th Grade
13 questions
Instalacion de Equipos #1
Quiz
•
9th Grade - University
18 questions
Quiz sobre Entornos Virtuales de Aprendizaje
Quiz
•
12th Grade
18 questions
Moni y Lucas
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
