
Python Worksheet - 1
Authored by Ms.Akilandeswari B
Computers
Professional Development
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of 2+3?
4
5
7
6
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you comment out a line in Python?
Use '/*' and '*/' to wrap the line
Insert '//' at the beginning of the line
Enclose the line in triple quotes
Add a '#' symbol at the beginning of the line
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the keyword used for defining a function in Python?
define
def
function
func
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'is' operator in Python?
The 'is' operator compares identities of objects.
'is' operator checks for reference equality.
'is' operator compares values of objects.
'is' operator is used for value comparison.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'if' statement in Python?
To execute a block of code based on a specified condition.
To define a function in Python
To skip a block of code entirely
To repeat a block of code indefinitely
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you import a module in Python?
import math
use module
include module
load module
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the use of 'self' in Python classes?
To refer to the instance of the class within the class itself
To define a new class within the existing class
To access global variables outside the class
To import external libraries into the class
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?