
Mastering Python Fundamentals
Authored by Phani Kishore
Computers
Professional Development
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 is the correct file extension for Python files?
.txt
.cpp
.py
.java
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in Python?
variable1
1variable
variable name
variable-name
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the expression 3 * 1 ** 3?
1
9
0
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a list in Python?
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).
You create a list in Python by using the list() function without any arguments.
You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a function in Python?
method
def
define
function
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a built-in data type in Python?
tuple
list
array
dictionary
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'if' statement in Python?
To import modules in Python.
To execute code conditionally based on a boolean expression.
To define a function in Python.
To create a loop in Python.
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?