
Python Programming Quiz

Quiz
•
Computers
•
1st Grade
•
Easy
Adham Elmuntser
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Final Exam 20 Feb 2020

Quiz
•
KG - Professional Dev...
25 questions
Quiz Teknologi Layanan Jaringan

Quiz
•
1st Grade
25 questions
Soal Penilaian Akhir Semester Informatika

Quiz
•
1st Grade
27 questions
F.1 CL 2nd Term Revision

Quiz
•
KG - 3rd Grade
35 questions
đứa nào dưới tb tao đập

Quiz
•
1st - 5th Grade
30 questions
INTRODUCTION TO APPLICATION SOFTWARE

Quiz
•
1st Grade - University
25 questions
BAMBOO - ÔN TẬP HK1 - MÔN TIN 11

Quiz
•
1st Grade
25 questions
Inventory Management Quiz

Quiz
•
1st 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
18 questions
D189 1st Grade OG 1c Concept 37-38

Quiz
•
1st Grade
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Exploring Properties of Matter

Interactive video
•
1st - 5th Grade
5 questions
Life at a pond

Quiz
•
1st Grade
14 questions
Plural Nouns Adding s and es

Quiz
•
1st - 2nd Grade