
Python Basics Assessment
Authored by SUNITA YADAV
Computers
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the basic data types in Python?
int, float, str, bool, list, tuple, set, dict
char, float, array, dict
int, float, str, bool, array, dict
int, float, str, boolean, list
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a variable in Python?
declare variable_name as value
variable_name : value
You declare a variable in Python by using the syntax: variable_name = value.
value = variable_name
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a list and a tuple in Python?
The main difference is that lists are mutable and tuples are immutable.
Tuples are created using square brackets, while lists use parentheses.
Lists can contain only numbers, while tuples can contain any data type.
Lists are faster than tuples in all operations.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'if' statement in Python?
To define a function in Python.
To execute code conditionally based on a boolean expression.
To create a loop in Python.
To import modules in Python.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a loop that iterates over a list in Python?
for item in my_list: print(item)
for item in range(len(my_list))
while item in my_list:
foreach item in my_list:
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in Python and how is it defined?
A function in Python is defined using the 'def' keyword, followed by the function name and parentheses.
A function in Python is created with the 'create' keyword.
A function in Python is defined using the 'func' keyword.
A function in Python is defined by writing its name followed by a colon.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'return' statement in a function?
To define the function's parameters.
To create a loop within the function.
The purpose of the 'return' statement is to provide a value from a function to its caller.
To end the function execution immediately.
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
10 questions
Arduino
Quiz
•
7th - 12th Grade
10 questions
Sistema Operativo
Quiz
•
1st - 12th Grade
10 questions
Excel
Quiz
•
11th - 12th Grade
15 questions
Vocabulary of Computer
Quiz
•
12th Grade
10 questions
Bài 25 tin 10
Quiz
•
9th Grade - University
15 questions
Asesmen Sumatif
Quiz
•
12th Grade
20 questions
Teknik Pengolahan Audio dan Video
Quiz
•
12th Grade
10 questions
Intro to Windows Server 2012
Quiz
•
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