stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Chapter 5 Key terms by Jermaine Flashcards | StudBud
Explore
/
Chapter 5 Key terms by Jermaine
Chapter 5 Key terms by Jermaine
28 terms
·
StudBud Administration
Imported from external platform
Flashcards
28 cards
F
Practice quiz
P
Host live
L
Questions
28
Answers
1
Which of the following options correctly defines a function?
define function_name
func function_name
define_function_name
def function_name
2
Which of the following is the correct syntax for a function header?
def function_name():
function_name
none of the above
def function_name
3
what is the purpose of the math?
Handling complex numbers
Managing file input and output
Performing advanced mathematical operations
Defining and manipulating strings
4
parameter passing is always done by position, meaning the values are assigned to parameters based on their order.
False
True
5
Global variables in Python can only be accessed and modified within the function where they are declared.
False
True
6
What is the value of math.pi?
It cannot be accurately represented as a fraction or decimal
22/7
3.14159
3.14
7
What does a Function Call do in python
Creating a new function within an existing one
Invoking the execution of a function
Process of assigning a value to a variable
act of defining a function
8
Which of the following statements accurately describes the role of indentation and functions?
optional in Python, but functions are mandatory for code execution.
none of the above
define a block of code within a function while functions used execute task
Are interchangeable concepts in Python and can be used interchangeably.
9
The pass statement in Python is used as a placeholder and does not have any effect on the program's execution.
False
True
10
Which of the following is a valid function name?
def
123function
_myFunction
my-function
11
The return statement in Python is used to terminate the function and return control to the main program.
True
False
12
Local variables in Python are accessible and modifiable outside the function in which they are declared.
True
False
13
What is the scope of a variable?
Region of a program where a variable can be accessed and manipulated.
Number of times a variable is used in a program.
Speed at which a variable is initialized
Process of assigning a value to a variable
14
Parameter is a variable that is used in the function definition to represent a value that can be passed to the function.
True
False
15
what does the keyword none represent in python?
An undefined variable
Placeholder for a variable
Special value indicating the absence of a meaningful result
constant with a value of zero
16
Which of the following statements correctly describes void functions?
Void functions do not return any value.
Void functions are used to perform repetitive task
Void functions can take multiple arguments
Void functions are only used in object-oriented programming
17
what does the term "Function Definition" specifically refer to?
Code block within a function
Process of invoking a function
Name assigned to a function
Structure that specifies a function's name, return type, and parameters
18
Block of code is not defined by indentation, and it is not significant for the structure of the program.
False
True
19
Which of the following statements accurately describes value-returning functions?
Value-returning functions are those that return a result to the statement
Value-returning functions do not require any parameters
Value-returning functions are used to perform mathematical operations only
Value-returning functions can only return integers
20
Using functions in Python can help make code more modular and reusable.
False
True
21
what is a Module?
Built-in function in the Python standard library
Data type for storing collections of items
mathematical constant like pi or e
file containing Python code that can be executed
22
What does the symbol math.e stand for in python?
Pi
base of natural logarithm
Euler's number
Square root of 2
23
Argument is a value that is passed to a function during a function call to provide input for the function's parameters
False
True
24
The import statement is used to load a module into a Python script.
False
True
25
Parameter Scope in Python refers to the visibility and accessibility of variables within different parts of a program?
True
False
26
What does the random module in Python allow you to do?
Create a randomly ordered dictionary
Generate pseudo-random numbers for various purposes
Shuffle the characters of a string randomly
Sort elements in a list in a random order
27
The Divide and Conquer algorithm always results in the most efficient solution for any given problem.
True
False
28
Global constants in Python are declared outside of any function or class.
False
True