Feedback - Quiz 2a: You Submitted This Quiz On Sun 31 Jan 2016 7:44 PM PET. You Got A Score of 100.00 Out of 100.00
Feedback - Quiz 2a: You Submitted This Quiz On Sun 31 Jan 2016 7:44 PM PET. You Got A Score of 100.00 Out of 100.00
Feedback - Quiz 2a: You Submitted This Quiz On Sun 31 Jan 2016 7:44 PM PET. You Got A Score of 100.00 Out of 100.00
1 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
Feedback Quiz 2a
Help Center
You submitted this quiz on Sun 31 Jan 2016 7:44 PM PET. You got a score of
100.00 out of 100.00.
Question 1
What typically calls an event handler?
Your Answer
Score
Explanation
10.00
Correct.
Some code that you didn't write which generates the event.
Total
10.00 / 10.00
Coursera
2 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
Question 2
In CodeSkulptor, how many event handlers can be running at the same time?
Your Answer
1
Score
Explanation
10.00
Correct.
10.00 / 10.00
Coursera
3 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
Question 3
What are the three parts of a frame?
Refer to the video on SimpleGUI.
Your Answer
Score
Background Area
0.17
Status Area
3.00
Title
0.17
Keyboard
0.17
Canvas
3.00
Border
0.17
Control Area
3.00
Options Area
0.17
Mouse
0.17
Total
Explanation
10.00 / 10.00
Question 4
For the SimpleGUI-based programs in this course, we recommended breaking down an
interactive Python program into seven parts. Below, these parts are listed alphabetically.
1. Create frame
2. Define classes
3. Define event handlers
4. Initialize global variables
5. Define helper functions
6. Register event handlers
7. Start frame and timers
Coursera
4 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
in the range 17, separated only by spaces, to indicate the recommended ordering of the
preceding elements of an interactive Python program. For example, if you think that the first
action in your program should be to register your event handlers, enter 6 as the first number
in the sequence.
You entered:
4523167
Your Answer
Score
1.43
1.43
1.43
1.43
1.43
1.43
1.43
Total
Explanation
10.00 / 10.00
Question 5
Assume the following global definition is part of your program.
If each of the following function definitions are also part of your program, which of them
needs a
Your
Answer
global x
Score
Explanation
Coursera
5 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
1.50
This example does not need a global declaration. You don't need a
def c(y):
return x
+y
1.50
def b(x,y):
x=x+
y
return x
5.50
def a(y):
x=x+
y
return
y
1.50
This example does not need a global declaration. You don't need a
def d(y):
y=x+
y
return
y
Total
10.00 /
10.00
Question 6
Consider the following code.
count
at the end? Enter a number. (You can double check your answer
Coursera
6 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
Your
Score
Explanation
10.00
Answer
4
is increased by 1.
Total
10.00 /
10.00
Coursera
7 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
Question 7
Consider the following code.
Your Answer
Score
2.50
2.50
2.50
2.50
Total
Explanation
10.00 / 10.00
Question 8
Consider the following code.
Coursera
8 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
Your Answer
Score
2.50
2.50
2.50
2.50
Total
Explanation
10.00 / 10.00
Question 9
Which of the following are valid calls to
create_frame
Look at the documentation for SimpleGUI frames, but also try the code in CodeSkulptor.
Your Answer
frame = simplegui.create_frame(200, 200,
Score
1.00
4.00
4.00
1.00
Explanation
200, 200)
f = simplegui.create_frame("My Frame",
100, 100)
frame = simplegui.create_frame("Testing",
200, 200, 300)
frame = simplegui.create_frame("My
Frame", 200, 200, 200, 200)
Total
10.00 /
10.00
Question 10
Coursera
9 de 10
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
If the following is our entire program, what one line of code should replace the question
marks for it to show a frame?
Your Answer
import simplegui
Score
Explanation
10.00
import simplegui.create_frame
import create_frame
Total
10.00 / 10.00
Coursera
https://class.coursera.org/interactivepython1-010/quiz/feedback?submissi...
10 de 10