
Python Quiz - Beginner level
Authored by Deepti Vaidya
Computers
7th Grade
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
In Python, a variable must be declared before it is assigned a value:
True
False
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following statements assigns the value 100 to the variable x in Python:
let x = 100
x = 100
x := 100
x ← 100
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:
True
False
4.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Which of the following are valid Python variable names:
4square
Age
route66
ver1.3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are reading Python code, and these statements appear scattered in different locations throughout the code:
employeenumber = 4398
.
.
.
EmployeeNumber = 4398
.
.
.
employeeNumber = 4398
These statements refer to the same variable.
These statements refer to different variables.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of the following is correct way of declaring and initialising a variable, x with value 5?
int x
x=5
int x=5
x=5
declare x=5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is incorrect regarding variables in Python?
Variable names in Python cannot start with number. However, it can contain number in any other position of variable name.
Variable names can start with an underscore.
Data type of variable names should not be declared
None of these
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?