 Call Kai
Call Kai Learn
Learn Practice Test
Practice Test Spaced Repetition
Spaced Repetition Match
Match1/24
Looks like no tags are added yet.
| Name | Mastery | Learn | Test | Matching | Spaced | 
|---|
No study sessions yet.
what is the meaning of the x variable?
the x position of the center circle
the following program should draw a circle on the screen. but when we run this code, we don't see the circle. what are we missing?
you need to add the circle with the add(circle) command
which of the following will accomplish the given the following function (assume SIZE, HEIGHT, and WIDTH are properly defined)
x= random.randint(SIZE, WIDTH-SIZE)
Y= random.randint(SIZE, WEIGHT-SIZE)
draw_circle(x,y, SIZE)
Why do we write functions?
I, II, and III
in the following function print_three_times what is the parameter of the function
word
what is the output of the following program
15 5
what is printed by the following program
0
1
2
how many parameters go into the function and how many return values come out of the function
3 go in, 1 return value comes out
which of the following functions is the correct implementation of is_superman?
def is_superman(is_bird, is_plane):
return not is_bird and not is_plane
what is printed by the following program
7
which variables could you type at point a and the program will still work
result, x, y, num1, num2, and MAX_NUMBER (longest choice)
functions must have parameters
false
which statement allows us to return values from functions
return
which of the following is true for a API?
I, II, III, IV, V, and VI (longest choice)
what does API stand for in computer science
Application Programming Interface
what is the purpose of a return statement in a function
stops executing the function and returns the value
which of the following is true about return values
Functions can have return values, but they are optional.
consider the following code snippet. what is returned and printed for the value of a?
10
what does the mystery function do in the code snippet below
returns the smaller of two values passed to it
consider the following code snippet. what would the following print
this would generate an error
which of the following functions will correctly return true if it is passed an odd integer value for x?
I and III only
in the third call to draw_circle(), what values are passed to the coordinates of the center of the circle
150, 150
what is the return value for this function
this function has no return value
what are the names of the parameters
first, second, third
which of the following is the correct way to create a function in python?
def my_function():