stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Functions - Part 1 Flashcards | StudBud
Explore
/
Functions - Part 1
Functions - Part 1
5 terms
·
StudBud Administration
·
25 plays
Question about functions – part 1
Flashcards
5 cards
F
Practice quiz
P
Host live
L
Questions
5
Answers
1
What is the keyword used to return a value from a function in Python?
return
giveback
None
yield
2
What happens if a function in Python does not have a return statement?
It raises an error
It returns None implicitly
It automatically returns the input parameter
It terminates the program
3
What is the purpose of a user-defined function in Python?
To perform mathematical operations only
To create reusable blocks of code to perform specific tasks
To print statements to the console
To declare variables within a program
4
Which of the following statements about '
return
' statement is true?
The function throws an error if there is no value specified with return.
The function immediately stops, and returns control to the caller.
The return statement is mandatory in every Python function.
A return statement can only be used once per function.
5
Which keyword is used to define a function in Python?
func
define
function
def