Python Quiz (part 1)

Python Quiz (part 1)

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

Python

Python

9th Grade

15 Qs

Python list, if

Python list, if

6th - 12th Grade

20 Qs

Python

Python

10th Grade

23 Qs

Python

Python

6th - 10th Grade

17 Qs

PYTHON PROGRAMMING

PYTHON PROGRAMMING

11th - 12th Grade

15 Qs

Python Programming Random Quiz

Python Programming Random Quiz

11th Grade

15 Qs

Introduction to Python

Introduction to Python

KG - University

25 Qs

Computer Science (Python)

Computer Science (Python)

9th Grade

18 Qs

Python Quiz (part 1)

Python Quiz (part 1)

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Adam Ricketts

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct variable assignment in Python?
int number = 5
5 = number
number = 5
number == 5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type is the following value: 3.14?
int
str
list
float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid variable name in Python?
my_var
_variable
2ndVar
var-name

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the data type of the variable result after the following operation? result = 10 / 3
int
str
float
list

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a string variable in Python?
name = 'Alice'
name = Alice
name : 'Alice'
name == 'Alice'

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to initialize a list in Python?
list = {}
list = []
list = ''
list = ()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to determine the data type of a variable?
datatype()
typeof()
print()
type()

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?