
Python Programming Quiz
Quiz
•
others
•
12th Grade
•
Hard
Jennifer Johnson
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 is false about naming functions and parameters?
Names can have spaces.
Names can have digits.
Some names are reserved by python.
Names cannot start with digits.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following would be a legal call for the code below? def drawPrettyStar(numberOfPoints, radius, color): Star(200, 200, radius, numberOfPoints, fill=color)
drawPrettyStar(5, 30, 'red')
drawPrettyStar(5, 'blue', 40)
drawPrettyStar('purple', 20, 35)
drawPrettyStar('4', '5', blue)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Using the same code segment from #2, which of the following is not a parameter of the function
drawPrettyStar?
def drawPrettyStar(numberOfPoints, radius, color):
Star(200, 200, radius, numberOfPoints, fill=color)
numberOfPoints
radius
color
fill
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following calls to onMousePress will do nothing? def onMousePress(mouseX, mouseY): if (mouseX != mouseY): Circle(mouseX, mouseY, 10, fill='mediumVioletRed')
onMousePress(100,200)
onMousePress(100,400)
onMousePress(200,100)
onMousePress(300,300)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid call to the function g and will have f(x) called 3 times?
g(5, 10)
g(10, 5)
g(4, 5)
g(4, 10)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following results in a red rectangle being drawn when the mouse is moved in the left half of the canvas and a green rectangle being drawn when the mouse is moved elsewhere? (Assume the function drawRect will draw a rectangle given the color)
if(mouseY <= 200)
if(mouseY <= 100)
if(mouseX <= 100)
if(mouseX <= 200)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Read through the following lines of code that contains an error. What should be done to fix the error?
The Rect function is not called correctly and needs an extra parameter.
The draw function is defined incorrectly since you cannot define a function without parameters.
The draw function is called too early. Line 1 should be on Line 5.
There are no errors with the code as it is.
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
11 questions
Energy Transformations Practice
Quiz
•
7th Grade - University
10 questions
Feudalism, Black Death, Renaissance Quiz
Quiz
•
9th - 12th Grade
14 questions
Middle Ages Review
Quiz
•
9th - 12th Grade
10 questions
All About Penguins Quiz
Quiz
•
3rd Grade - University
15 questions
U.S. Gov - Unit 4 Quiz - Legislative Branch
Quiz
•
12th Grade
15 questions
Industry Vocabulary Showdown
Quiz
•
9th - 12th Grade
15 questions
Python Quiz
Quiz
•
10th Grade - University
10 questions
4. Moon opener
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for others
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
11 questions
Halloween Trivia #2
Quiz
•
12th Grade
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
8 questions
Veterans Day Quiz
Quiz
•
12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
21 questions
Halloween & Math
Quiz
•
8th - 12th Grade
