
Python Programming MP4 EMPA Review Part 2
Authored by Lisa Zaranski
Computers
9th - 12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Only one parameter can have a default value given
Any parameters that don’t have default values must come before any parameters that do have default values
Default parameters must be the same type for every parameter
There is nothing wrong with the function
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following Python lines contains a valid comment?
Which of the following Python lines contains a valid comment?
def get_name(): # get the user’s name
def get_name():
def get_name(): ** get the user’s name
def get_name(): % get the user’s name
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following for loops will loop 12 times?
for i in range(12):
for i in range(1, 12):
for i in range(0, 11):
for i in range(1, 12, 1):
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
2
8
12
20
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Three of the for loops below will provide identical values for i. Which for loop will provide values that do not match the others?
for i in range(0, 5):
for i in range(5):
for i in range(0, 5, 1):
for i in range(5, 0, 1):
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What would you use if you wanted to ask the user for the number of ounces of water he/she drank that day, and then print one of two messages based on the number?
If
While
For
If-else
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
When would a while loop be a better control structure to use than a for loop?
When you need to repeat multiple commands
When you need to repeat something 5 times
When you don’t know how many times something will need to repeat
When the user is inputting how many times to repeat something
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
15 questions
UH 1 SPREADSHEET X-2
Quiz
•
10th Grade
16 questions
Cuestionario Palabras Reservadas Python
Quiz
•
9th - 12th Grade
20 questions
Python Recap
Quiz
•
7th Grade - University
20 questions
CPA Revision MCQ1
Quiz
•
8th - 9th Grade
15 questions
Lua Review Corona SDK with Notepad++
Quiz
•
10th - 12th Grade
17 questions
Traffic Light Project Quiz
Quiz
•
9th Grade
20 questions
UNIT 3- DATA COMMUNICATION
Quiz
•
12th Grade
15 questions
JavaScript Quiz 2
Quiz
•
9th 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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