
Python Programming Quiz
Authored by Adham Elmuntser
Computers
1st Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: def greet(): print("Hello, World!") greet()
Hello, Python!
Hello, World!
Hello!
World!
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the function greet(name), what is name classified as?
A method
A string
A parameter
A loop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following function return:
def add(a, b):
return a + b
Sum of a and b
Difference of a and b
Multiplication of a and b
Division of a and b
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value for the parameter name in the function definition def greet(name="Guest")?
Alice
Guest
Bob
Python
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of object does the function get_min_max(numbers) return?
A list
A dictionary
A tuple
A string
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a lambda function in Python?
A named function
An anonymous function
A recursive function
A nested function
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the base case in the recursive function
def factorial(n):
if n == 0:
return 1
return n * factorial(n - 1)
n == 1
n == 0
n > 0
n < 0
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
27 questions
Пайтон новый
Quiz
•
1st - 5th Grade
30 questions
Python L1 Programming Challenge
Quiz
•
1st - 12th Grade
35 questions
Grade One - Pakistan International School Alkhobar.
Quiz
•
1st Grade
29 questions
Arduino_Testing
Quiz
•
1st Grade
30 questions
10 сынып инф 3-нұсқа
Quiz
•
1st Grade
31 questions
Algoritmos e lógica de programação - 2
Quiz
•
1st Grade
25 questions
jquery
Quiz
•
1st Grade
25 questions
КИгр №16 Финал
Quiz
•
1st - 3rd 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
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
13 questions
Fractions
Quiz
•
1st - 2nd Grade
20 questions
CVC Words
Quiz
•
KG - 1st Grade
15 questions
Place Value tens and ones
Quiz
•
1st Grade
16 questions
Money - Coins
Lesson
•
1st - 2nd Grade
20 questions
Halves and Fourths
Quiz
•
1st Grade