
python functions
Authored by Geeta Gupta
Computers
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code output?
11, 9
16, 16
None, None
225, 117
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct code to define a function?
def area ( ):
area ( )
def area:
def area ( )
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How do you correctly call this function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword marks a spot in a function where the program flow will go back to the calling code?
break
return
continue
jump
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many return statements can you place inside one function body?
As many as needed; each marks a spot where program flow returns to the calling code
You can have one return statement per parameter that is defined by the function "def"
You are limited by the number of body statements, divided by 2
Exactly one
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What controls a variable's scope?
The location where it is first initialized within your code
The comment you place to the right of the variable name
The capitalization you select for the letters in your function name
The length of your variable name
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following rules is true about locally scoped variables?
Local variables can hold less data than global variables
Local variables can be seen and accessed from any part of the program code
Local variables will keep their same value over repeated calls to the function
Local variables can only be seen and used from inside a function
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
NEO LMS Training
Quiz
•
University
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Unguided transmission media
Quiz
•
University
10 questions
Software Security
Quiz
•
University - Professi...
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
ML Course Activity-II
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