Python Quiz (part 1)

Python Quiz (part 1)

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

String Manipulation 2

String Manipulation 2

10th Grade

17 Qs

TEST1.PY

TEST1.PY

10th Grade - University

20 Qs

Python массив

Python массив

9th Grade

16 Qs

Python String

Python String

12th Grade

20 Qs

Grade 8 End of Unit Revision

Grade 8 End of Unit Revision

8th Grade - University

15 Qs

Quiz1_7C

Quiz1_7C

3rd Grade - University

15 Qs

Python - getting started

Python - getting started

8th - 10th Grade

20 Qs

Data Science (Quiz in Python)

Data Science (Quiz in Python)

11th Grade

20 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?