Python Variable - Quiz

Python Variable - Quiz

7th Grade

9 Qs

quiz-placeholder

Similar activities

QUIZ MY BCA

QUIZ MY BCA

1st Grade - University

10 Qs

Roblox Studio Lesson 6

Roblox Studio Lesson 6

6th Grade - University

12 Qs

Python L39 US Game 1

Python L39 US Game 1

6th - 8th Grade

12 Qs

ITS Python 條件判斷式課堂測驗

ITS Python 條件判斷式課堂測驗

6th Grade - University

10 Qs

7 клас Python Алгоритми та програми

7 клас Python Алгоритми та програми

7th Grade

12 Qs

Bài tập về thông tin và máy tính

Bài tập về thông tin và máy tính

3rd Grade - University

10 Qs

TIN 7. CĐE. BÀI 10 THỰC HÀNH TỔNG HỢP

TIN 7. CĐE. BÀI 10 THỰC HÀNH TỔNG HỢP

7th Grade

6 Qs

Ms Excel 1

Ms Excel 1

7th Grade

10 Qs

Python Variable - Quiz

Python Variable - Quiz

Assessment

Quiz

Information Technology (IT)

7th Grade

Practice Problem

Hard

Created by

Hafiz Putra

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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"