Deck 3: Simple functions

ملء الشاشة (f)
exit full mode
سؤال
The function header marks the beginning of the function definition.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A function definition specifies what a function does and causes the function to execute.
سؤال
A(n) _____ is any piece of data that is passed into a function when the function is called.

A) global
B) argument
C) scope
D) parameter
سؤال
A(n) _____ variable is created inside a function.

A) global
B) constant
C) defined
D) local
سؤال
The hierarchy chart shows all the steps that are taken inside a function.
سؤال
When a function is called by its name, then it is _____.

A) executed
B) located
C) defined
D) exported
سؤال
A(n) _____ is a variable that receives an argument that is passed into a function.

A) global
B) argument
C) scope
D) parameter
سؤال
A set of statements that belong together as a group and contribute to the function definition is known as a(n) _____.

A) header
B) block
C) return
D) parameter
سؤال
What is a group of statements that exists within a program for the purpose of performing a specific task?

A) function
B) subtask
C) procedure
D) subprogram
سؤال
The _____ argument specifies which parameter the argument should be passed into.

A) keyword
B) local
C) global
D) string
سؤال
A(n) _____ chart is also known as a structured chart.

A) flow
B) data
C) hierarchy
D) organizational
سؤال
The first line in the function definition is known as the function _____.

A) header
B) block
C) return
D) parameter
سؤال
A(n) _____ variable is accessible to all the functions in a program file.

A) keyword
B) local
C) global
D) string
سؤال
It is recommended that programmers should avoid using _____ variables in a program when possible.

A) local
B) global
C) string global
D) keyword
سؤال
A local variable can be accessed from anywhere in the program.
سؤال
A variable's _____ is the part of a program in which the variable may be accessed.

A) global
B) argument
C) scope
D) local
سؤال
A(n) _____ constant is a global name that references a value that cannot be changed.

A) keyword
B) local
C) global
D) string
سؤال
The _____ design technique can be used to break down an algorithm into functions.

A) subtask
B) block
C) top-down
D) simplification
سؤال
The _____ of a local variable is the function in which the variable is created.

A) global
B) defined
C) local
D) scope
سؤال
Python function names follow the same rules for naming variables.
سؤال
One of the reasons not to use global variables is that it makes a program hard to debug.
سؤال
Python allows for passing multiple arguments to a function.
سؤال
Arguments are passed by _______________ to the corresponding parameter variables in the function.
سؤال
The approach called _______________ is taking a large task and dividing it into several smaller tasks that are easily performed.
سؤال
The main function contains a program's _______________ logic, which is the overall logic of the program.
سؤال
To assign a value to a global variable in a function, the global variable must first be declared in the function.
سؤال
In a flowchart, a function call is depicted by a(n) _______________ that has vertical bars.
سؤال
The code for a function is known as a function _______________.
سؤال
The top-down design breaks down the overall task of the program into a series of _______________.
سؤال
Different functions can have local variables with the same names.
سؤال
The function header begins with the keyword _______________ followed by the name of the function.
سؤال
A variable is visible only to statements in the variable's _______________.
سؤال
The value assigned to a global constant can be changed in the mainline logic.
سؤال
A(n) _______________ chart is a visual representation of the relationships between functions.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/34
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 3: Simple functions
1
The function header marks the beginning of the function definition.
True
2
A function definition specifies what a function does and causes the function to execute.
False
3
A(n) _____ is any piece of data that is passed into a function when the function is called.

A) global
B) argument
C) scope
D) parameter
B
4
A(n) _____ variable is created inside a function.

A) global
B) constant
C) defined
D) local
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
5
The hierarchy chart shows all the steps that are taken inside a function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
6
When a function is called by its name, then it is _____.

A) executed
B) located
C) defined
D) exported
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
7
A(n) _____ is a variable that receives an argument that is passed into a function.

A) global
B) argument
C) scope
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
8
A set of statements that belong together as a group and contribute to the function definition is known as a(n) _____.

A) header
B) block
C) return
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is a group of statements that exists within a program for the purpose of performing a specific task?

A) function
B) subtask
C) procedure
D) subprogram
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
10
The _____ argument specifies which parameter the argument should be passed into.

A) keyword
B) local
C) global
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
11
A(n) _____ chart is also known as a structured chart.

A) flow
B) data
C) hierarchy
D) organizational
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
12
The first line in the function definition is known as the function _____.

A) header
B) block
C) return
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
13
A(n) _____ variable is accessible to all the functions in a program file.

A) keyword
B) local
C) global
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
14
It is recommended that programmers should avoid using _____ variables in a program when possible.

A) local
B) global
C) string global
D) keyword
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
15
A local variable can be accessed from anywhere in the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
16
A variable's _____ is the part of a program in which the variable may be accessed.

A) global
B) argument
C) scope
D) local
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
17
A(n) _____ constant is a global name that references a value that cannot be changed.

A) keyword
B) local
C) global
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
18
The _____ design technique can be used to break down an algorithm into functions.

A) subtask
B) block
C) top-down
D) simplification
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
19
The _____ of a local variable is the function in which the variable is created.

A) global
B) defined
C) local
D) scope
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
20
Python function names follow the same rules for naming variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
21
One of the reasons not to use global variables is that it makes a program hard to debug.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
22
Python allows for passing multiple arguments to a function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
23
Arguments are passed by _______________ to the corresponding parameter variables in the function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
24
The approach called _______________ is taking a large task and dividing it into several smaller tasks that are easily performed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
25
The main function contains a program's _______________ logic, which is the overall logic of the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
26
To assign a value to a global variable in a function, the global variable must first be declared in the function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
27
In a flowchart, a function call is depicted by a(n) _______________ that has vertical bars.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
28
The code for a function is known as a function _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
29
The top-down design breaks down the overall task of the program into a series of _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
30
Different functions can have local variables with the same names.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
31
The function header begins with the keyword _______________ followed by the name of the function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
32
A variable is visible only to statements in the variable's _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
33
The value assigned to a global constant can be changed in the mainline logic.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) _______________ chart is a visual representation of the relationships between functions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.