Understanding Python Variable Syntax

Quiz
•
Computers
•
7th Grade
•
Hard
Quentin Deen
Used 2+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in Python?
2nd_place
second_place
second-place
second place
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value will the variable `color` have after the following code? `color = "red"`
red
"red"
color
'color'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid variable name in Python?
book_shelf
bookShelf
book-shelf
book_shelf2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of `points` after this code? `points = 44`
"44"
44
points
None
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following variable names follows Python's naming rules?
1st_place
firstPlace
first-place
first place
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of value is stored in the variable below? `animal = "cat"`
Integer
String
Boolean
Float
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to assign the value 10 to a variable named `score`?
score == 10
score = 10
10 = score
score := 10
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
Python Beginner

Quiz
•
6th - 12th Grade
30 questions
Python Programming End of Unit Assessment

Quiz
•
7th - 9th Grade
25 questions
EduBlocks NCCE Lesson 1-2

Quiz
•
7th - 8th Grade
31 questions
Python - Variables

Quiz
•
6th - 8th Grade
30 questions
7.6 Programming (2021)

Quiz
•
7th Grade
35 questions
Programming/Coding Basics - PreAssessment

Quiz
•
7th - 10th Grade
25 questions
Python Quiz - print + input

Quiz
•
7th Grade
25 questions
ALB Basic Python Quiz

Quiz
•
6th - 8th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade