
Python Basics Quiz I
Authored by Julius Gunawan
Information Technology (IT)
10th 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?
string, number, boolean, object
char, list, tuple, dict
int, float, array, set
int, float, str, bool
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a variable in Python?
var variable_name = value
You declare a variable in Python by using the syntax: variable_name = value.
let variable_name = value
variable_name : value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a list and a tuple in Python?
Lists can contain only numbers, while tuples can contain any data type.
The main difference is that lists are mutable and tuples are immutable.
Tuples are created using square brackets, while lists use parentheses.
Lists are faster than tuples in all operations.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What control structure would you use to execute code repeatedly?
Variable
Condition
Loop
Function
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a dictionary in Python?
You must use parentheses to create a dictionary, e.g., ('key', 'value')
Dictionaries can only be created with the list() function.
You can create a dictionary using square brackets, e.g., ['key': 'value']
You can create a dictionary in Python using curly braces, e.g., {'key': 'value'}, or using the dict() function.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'if' statement in Python?
To define a function in Python.
To import modules in Python.
To execute code conditionally based on a boolean expression.
To create a loop in Python.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you convert a string to an integer in Python?
Use eval(string) to evaluate the string as an expression.
Apply float(string) to convert a string to a float.
Use int(string) to convert a string to an integer.
Use str(int) to convert an integer to a string.
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
Taller de Cultura Digital Parcial 1
Quiz
•
10th Grade
20 questions
PTS KELAS 7
Quiz
•
9th - 12th Grade
18 questions
Diagnostico Grado Sexto
Quiz
•
6th Grade - University
10 questions
QUIZ 2 PLC
Quiz
•
10th Grade - University
20 questions
ETECH 2ND QUARTER QUIZ
Quiz
•
9th - 12th Grade
10 questions
BASIC Programming (I)
Quiz
•
10th Grade
12 questions
Fundamentals
Quiz
•
7th Grade - University
15 questions
Quiz 1-15
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
10 questions
Dr. King's Speech and Its Impact
Interactive video
•
7th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
7 questions
Anti-Bullying ARS 15-341
Quiz
•
9th - 12th Grade
20 questions
Cell Organelles
Quiz
•
10th Grade
10 questions
Finding Area and Circumference of a Circle
Interactive video
•
6th - 10th Grade