Python_Variables

Python_Variables

University

10 Qs

quiz-placeholder

Similar activities

Commas in Letters

Commas in Letters

2nd Grade - University

15 Qs

Speaking

Speaking

University

10 Qs

Python Output Based Quiz

Python Output Based Quiz

University

15 Qs

ESL American English Greetings

ESL American English Greetings

University

10 Qs

Quiz Basic English

Quiz Basic English

6th Grade - University

10 Qs

Correspondence

Correspondence

University

15 Qs

Dany/2p

Dany/2p

University

15 Qs

Quotation in Dialogue

Quotation in Dialogue

5th Grade - University

15 Qs

Python_Variables

Python_Variables

Assessment

Quiz

English

University

Hard

Created by

Deekshitha K

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is not a valid variable name in Python?


a) my_variable

b) 123_variable

c) myvariable

d) myVariable

2.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is not a valid data type in Python?


a) int

b) 123_float

c) str

d) bool

3.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the output of the following Python code snippet?

print(10/3)

a) 3.333

b) 3

c) 3.0

d) 3.33

4.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is the correct way to comment a single line in Python?

a) // This is a comment

b) # This is a comment

c)

d) /* This is a comment */

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Python code snippet?

print(5**2)

a) 10

b) 25

c) 7

d) 52

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is a correct way to declare a list in Python?

a) list = [1, 2, 3]

b) list = (1, 2, 3)

c) list = {1, 2, 3}

d) list = {1: 'one', 2: 'two', 3: 'three'}

7.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the result of the following comparison in Python?

5 == 5.0

a) True

b) False

c) Error

d) None

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?