
Python Quiz -6 Summer internship
Quiz
•
Other
•
University
•
Practice Problem
•
Easy
Gnaneshwar Reddy
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements correctly defines a function in Python?
Which of the following statements correctly defines a function in Python?
a) function myFunction()
b) def myFunction:
c) def myFunction():
d) define myFunction()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
def add(a, b):
return a + b print(add(2, 3))
What is the output of the following code?
def add(a, b):
return a + b print(add(2, 3))
a) 2
b) 3
c) 5
d) None
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you call a function named myFunction in Python?
How do you call a function named myFunction in Python?
a) call myFunction
b) myFunction()
c) execute myFunction
d) myFunction
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following lists is a valid Python list?
Which of the following lists is a valid Python list?
a) (1, 2, 3)
b) {1, 2, 3}
c) [1, 2, 3]
d) 1, 2, 3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
my_list = [1, 2, 3, 4]
print(my_list[2])
What will be the output of the following code?
my_list = [1, 2, 3, 4]
print(my_list[2])
a) 1
b) 2
c) 3
d) 4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you append an item to a list in Python?
How do you append an item to a list in Python?
a) list.add(item)
b) list.append(item)
c) list.insert(item)
d) list.appendList(item)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
def multiply_list(lst):
result = 1
for num in lst:
result *= num
return result
my_list = [1, 2, 3, 4]
print(multiply_list(my_list))
What will be the output of the following code?
def multiply_list(lst):
result = 1
for num in lst:
result *= num
return result
my_list = [1, 2, 3, 4]
print(multiply_list(my_list))
a) 10
b) 24
c) 12
d) None
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
10 questions
HTC004_Quiz 7
Quiz
•
University
15 questions
UAS AKUNTANSI MANAJEMEN
Quiz
•
University
10 questions
Study Quest KSU STC initiative
Quiz
•
University
15 questions
LIQUID LIQUID EXTRACTION
Quiz
•
University - Professi...
10 questions
Kế toán chi phí - C4 - Q2
Quiz
•
University
10 questions
Ice Breaking Quiz MPP
Quiz
•
University
15 questions
Football Quiz
Quiz
•
KG - Professional Dev...
10 questions
Capital Budgeting and Capital Ratioining Quiz
Quiz
•
University
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 Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
