
Python Coding Quiz
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Medium
Jason Cross
Used 2+ times
FREE Resource
Enhance your content in a minute
39 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to define a function in Python?
`def functionName:`
`def functionName():`
`function functionName():`
`function functionName:`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in Python?
`2variable`
`variable-2`
`variable_2`
`variable 2`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python print(2 + 3 * 4) ```
`20`
`14`
`24`
`9`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to create a comment in Python?
`// This is a comment`
`/* This is a comment */`
`# This is a comment`
``
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? ```python def add(a, b): return a + b print(add(2, 3)) ```
`2`
`3`
`5`
`None`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a conditional statement in Python?
`for`
`while`
`if`
`def`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python x = 10 if x > 5: print("Greater") else: print("Smaller") ```
`Greater`
`Smaller`
`None`
`Error`
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
40 questions
CodeHS Web Design - HTML - Mid-Unit Test
Quiz
•
9th - 12th Grade
35 questions
SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan
Quiz
•
10th - 12th Grade
37 questions
Ôn tập giữa kỳ 2 - Python
Quiz
•
10th Grade
39 questions
adobe photoshop 2015 certification quiz 1
Quiz
•
9th - 12th Grade
35 questions
MINH ÔN TẬP TIN HỌC LỚP 3
Quiz
•
1st - 12th Grade
36 questions
Engineering Careers
Quiz
•
9th - 12th Grade
35 questions
SCRATCH
Quiz
•
4th Grade - University
40 questions
Computer Science Pre-Assessment Quiz
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
