
Exploring Python Fundamentals

Quiz
•
Computers
•
University
•
Medium
Mr. Gogoi
Used 2+ times
FREE Resource
42 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What are the basic data types in Python?
float, number, string, object
int, float, str, bool, list, tuple, set, dict
integer, decimal, text, map
char, byte, string, array
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you create a list in Python?
You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.
You create a list in Python by using the list() function, e.g., my_list = list(1, 2, 3).
You create a list in Python using square brackets, e.g., my_list = [1, 2, 3].
You create a list in Python using parentheses, e.g., my_list = (1, 2, 3).
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of an if statement in Python?
To execute code conditionally based on a boolean expression.
To repeat code multiple times.
To create a loop for iteration.
To define a function in Python.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Explain the use of for loops in Python.
For loops in Python are primarily used for error handling.
For loops can only iterate over numbers in Python.
For loops in Python are used to define functions.
For loops in Python allow iteration over sequences and execute a block of code for each item.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is a function in Python and how is it defined?
A function in Python is defined using the 'func' keyword.
A function in Python is defined using the 'def' keyword, followed by the function name and parentheses.
A function in Python is defined by writing the function name followed by a colon.
Functions in Python are created with the 'create' keyword.
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How can you import a module in Python?
You can import a module by copying its code directly into your script.
Use the 'require' statement to load the module.
Modules can only be imported from the current directory.
Use the 'import' statement followed by the module name.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of the open() function in file handling?
To open a file and return a file object for file handling operations.
To create a new file without opening it.
To delete a file from the system.
To read the contents of a file into memory.
Create a free account and access millions of resources
Similar Resources on Wayground
38 questions
Secure Scripting: Exam 1 Review: Modules 1 - 4

Quiz
•
University
40 questions
Semester Final 2025

Quiz
•
10th Grade - University
40 questions
3rd Year August Quiz

Quiz
•
University
40 questions
Python Final

Quiz
•
University
40 questions
9th Grade - IT Programming - 2nd Cycle Exam

Quiz
•
9th Grade - University
40 questions
Takeshi's Castle Rapid Fire

Quiz
•
University
41 questions
Final Day Quiz for ICT Skill Share

Quiz
•
4th Grade - Professio...
40 questions
Repaso Python

Quiz
•
11th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade