
Fundamentals of Python Programming
Authored by Dr. Santosh Kumar Srivastava
Information Technology (IT)
12th Grade
Used 2+ 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 is the output of print(2 ** 3)?
8
4
9
6
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a list in Python?
You create a list in Python using curly braces, e.g., my_list = {}.
You create a list in Python by using parentheses, e.g., my_list = (1, 2, 3).
You create a list in Python by calling the list() function, e.g., my_list = list(1, 2, 3).
You create a list in Python using square brackets, e.g., my_list = [] or my_list = [1, 2, 3].
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a function in Python?
def
function
procedure
method
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'self' parameter in a class method?
The 'self' parameter allows access to instance attributes and methods within a class.
The 'self' parameter is used to define class-level attributes.
The 'self' parameter is a placeholder for static methods.
The 'self' parameter is used to pass data between classes.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you handle exceptions in Python?
Ignore exceptions and continue execution.
Log exceptions without handling them.
Use if-else statements to handle exceptions.
Use try-except blocks to handle exceptions.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a list and a tuple?
A list can only contain numbers; a tuple can contain any data type.
A list is a fixed size; a tuple can grow or shrink in size.
A list is mutable; a tuple is immutable.
A list is created using parentheses; a tuple is created using square brackets.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you read a file in Python?
Read a file using 'file.read()' without opening it first.
Use 'open(file)' to read a file directly.
Use 'with open("filename.txt", "r") as file: content = file.read()' to read a file.
Use 'import file' to access file contents.
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
Quizzi bài 29 Tin học 10
Quiz
•
10th Grade - University
20 questions
Mesin Pencari Artikel
Quiz
•
11th Grade - University
20 questions
Quiz Struktur Data
Quiz
•
9th Grade - University
15 questions
Asesmen Formatif Arduino LCD Kelas XII
Quiz
•
12th Grade
14 questions
Week 3-Database Quiz 1
Quiz
•
9th - 12th Grade
20 questions
Python
Quiz
•
9th - 12th Grade
10 questions
Mikrotik
Quiz
•
12th Grade
10 questions
0- and 1-Pixel Art Activity
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
Discover more resources for Information Technology (IT)
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
27 questions
7.2.3 Quadrilateral Properties
Quiz
•
9th - 12th Grade
7 questions
Amoeba Sisters Dihybrid Cross Punnett Square
Interactive video
•
9th - 12th Grade
10 questions
The Holocaust: Historical Overview
Interactive video
•
9th - 12th Grade
10 questions
Key Features of Quadratic Functions
Interactive video
•
8th - 12th Grade
11 questions
Exponent Quotient Rules A1 U7
Quiz
•
9th - 12th Grade