
Python Syntax Quiz
Quiz
•
Computers
•
9th Grade
•
Practice Problem
•
Hard
Devin Lachapelle
Used 2+ times
FREE Resource
Enhance your content in a minute
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax for assigning a value to a variable in Python?
variable_name : value
value = variable_name
variable_name = value
value to variable_name
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a string in Python?
Using parentheses ()
Using square brackets []
Using curly braces {}
Using single quotes ('') or double quotes ("")
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following is the correct syntax to print 'Hello World' in Python?
print('Hello World')
print('Hello World')
print(Hello World)
python.print(HelloWorld)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the input() function do in Python?
It is used to define a function in Python.
It is used to take input from the user through the console.
It is used to print output to the console.
It is used to generate random numbers in Python.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
x = "5"
y = "3"
print(y + x)
8
yx
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
name = input('Enter your name: ')
print('Hello, ' + name)
Hello, [name]
Hello, [input]
Hello, name
Hello,
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to concatenate (combine) two strings in Python?
*
+
-
//
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
Algoritmos
Quiz
•
8th - 9th Grade
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
9 questions
Napewno tego nie wiesz! - VIKI GABOR
Quiz
•
1st - 10th Grade
10 questions
Digital Footprint
Quiz
•
9th Grade
10 questions
hardware and software(g3)
Quiz
•
2nd - 10th Grade
10 questions
TQ - Review Quiz Week 1
Quiz
•
9th Grade
10 questions
Anime
Quiz
•
KG - University
10 questions
Unit 4 Inkscape Visual Graphics
Quiz
•
9th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
