
Python Variable - Quiz

Quiz
•
Information Technology (IT)
•
7th Grade
•
Medium
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'
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
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"
Similar Resources on Wayground
5 questions
CSS Quiz 1

Quiz
•
7th Grade
10 questions
Basics of Animation and Penci 2D

Quiz
•
6th - 8th Grade
10 questions
Code HS 8.13 CSS Select by ID

Quiz
•
7th Grade
10 questions
Prova PRONATEC

Quiz
•
6th - 8th Grade
10 questions
Level Two Quiz

Quiz
•
6th - 8th Grade
10 questions
Počítačová grafika

Quiz
•
6th Grade - University
10 questions
Spreadsheet - Basic Function

Quiz
•
7th Grade
12 questions
SOAL BAB 1 DAN 2 INFORMATIKA KELAS 7

Quiz
•
7th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Multiplying and Dividing Integers

Quiz
•
7th Grade
30 questions
Math Fluency: Multiply and Divide

Quiz
•
7th Grade
20 questions
Perfect Squares and Square Roots

Quiz
•
7th Grade
13 questions
Parts of Speech

Quiz
•
7th Grade