
Exploring Python Fundamentals
Authored by Mr. Gogoi
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
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
41 questions
L10 - ÔN TẬP KIỂM TRA GIỮA KỲ 1
Quiz
•
10th Grade - University
42 questions
COMPUTER NETWORKS [LEC] - UAC PREPARATION
Quiz
•
University
44 questions
20703 - SCCM
Quiz
•
University
45 questions
Comptia Network+ chapter 1-3 exam
Quiz
•
11th Grade - University
40 questions
Perangkat dan topologi Jaringan Internet
Quiz
•
8th Grade - University
47 questions
Networking - Practice Test #1
Quiz
•
9th Grade - University
40 questions
SIA: Quiz 1 (Lesson 1-2)
Quiz
•
University
47 questions
Quiz Jaringan Komputer
Quiz
•
9th Grade - University
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