Python Variable - Quiz

Python Variable - Quiz

7th Grade

9 Qs

quiz-placeholder

Similar activities

Python (basics)

Python (basics)

1st Grade - University

11 Qs

PL e CD 7ª série  Revisão(AV1)

PL e CD 7ª série Revisão(AV1)

7th Grade

9 Qs

Week one Revision

Week one Revision

6th - 8th Grade

4 Qs

BCCK-AI-HP1

BCCK-AI-HP1

6th - 8th Grade

10 Qs

CLass VI

CLass VI

6th - 8th Grade

14 Qs

Web - hp5 - ôn tập bài 6

Web - hp5 - ôn tập bài 6

7th Grade

8 Qs

Uji Pemahaman Berpikir Komputasional

Uji Pemahaman Berpikir Komputasional

7th Grade

10 Qs

GAIMF-US-0001 - Quiz 1

GAIMF-US-0001 - Quiz 1

6th - 8th Grade

10 Qs

Python Variable - Quiz

Python Variable - Quiz

Assessment

Quiz

Information Technology (IT)

7th Grade

Medium

Created by

Hafiz Putra

Used 1+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

What is a correct way to declare a Python variable?

var x = 5

#x = 5

$x = 5

x = 5

2.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

True or False:
You can declare string variables with single or double quotes.
x = "John"
# is the same as
x = 'John'

True
False

3.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

True or False:
Variable names are not case-sensitive.
a = 5
# is the same as
A = 5

True
False

4.

FILL IN THE BLANK QUESTION

1 min • 10 pts

Select the correct functions to print the data type of a variable:

............(type(myvar))

5.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Which is NOT a legal variable name?

my-var = 20

my_var = 20

Myvar = 20

_myvar = 20

6.

FILL IN THE BLANK QUESTION

1 min • 10 pts

Create a variable named carname and assign the value Honda to it.

carname = ........

7.

FILL IN THE BLANK QUESTION

1 min • 10 pts

Create a variable named x and assign the value 50 to it.

8.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

What is a correct syntax to add the value 'Hello World', to 3 variables in one statement?

x, y, z = 'Hello World'

x = y = z = 'Hello World'

x|y|z = 'Hello World'

9.

FILL IN THE BLANK QUESTION

1 min • 10 pts

Insert the correct syntax to assign values to multiple variables in one line:

x........y= "Orange", "Banana"