What is the correct way to declare a variable in Python?

Basic Python Concepts for Students

Quiz
•
Journalism
•
8th Grade
•
Hard
Keegan Aherne
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let x = 10
x := 10
var x : int = 10
x = 10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a list in Python?
You create a list in Python by using parentheses, e.g., my_list = (1, 2, 3).
You create a list in Python with the list() function, e.g., my_list = list(1, 2, 3).
You create a list in Python using square brackets, e.g., my_list = [1, 2, 3].
You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What symbol is used for comments in Python?
#
;
//
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to print output to the console?
output()
log()
print()
display()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in Python?
function_name(parameters) =>
def function_name(parameters):
function function_name(parameters)
create function function_name(parameters)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of 5 + 3 in Python?
8
6
10
9
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a loop that runs 5 times in Python?
for i in range(10): pass
for i in range(5): pass
while i < 5: pass
for i in range(5, 10): pass
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Journalism Pop Quiz

Quiz
•
7th - 8th Grade
10 questions
Paunang Kaalaman sa Journalism

Quiz
•
7th - 11th Grade
15 questions
แบบทดสอบรอบ 2

Quiz
•
8th Grade
18 questions
Press Release Quiz

Quiz
•
8th Grade
10 questions
News Defined

Quiz
•
6th - 8th Grade
20 questions
Journalism Ethics Quiz

Quiz
•
6th - 8th Grade
17 questions
The Giver [ Chapters 1-5 ]

Quiz
•
5th - 8th Grade
10 questions
Broadcast Media Week #16

Quiz
•
8th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Journalism
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
10 questions
Identifying equations

Quiz
•
KG - University
17 questions
guess the logo

Quiz
•
8th Grade
20 questions
Punctuation

Quiz
•
6th - 8th Grade
10 questions
Candy

Quiz
•
4th - 8th Grade
60 questions
FLACS Checkpoint A Review

Quiz
•
7th - 9th Grade
16 questions
Chapter 8 - Getting Along with your Supervisor

Quiz
•
3rd Grade - Professio...