Filters
Question type

Study Flashcards

One of the drawbacks of a modularized program is that the only structure you can use in such a program is the sequence structure.

A) True
B) False

Correct Answer

verifed

verified

A __________ variable is accessible to all the functions in a program file.


A) keyword
B) local
C) global
D) string

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

The value assigned to a global constant can be changed in the mainline logic.

A) True
B) False

Correct Answer

verifed

verified

The function header begins with the keyword __________ and is followed by the name of the function.

Correct Answer

verifed

verified

In a flowchart,a function call is depicted by a(n)___________.

Correct Answer

verifed

verified

Different functions can have local variables with the same names.

A) True
B) False

Correct Answer

verifed

verified

Python allows you to pass multiple arguments to a function.

A) True
B) False

Correct Answer

verifed

verified

The 'P' in the acronym IPO refers to ___________.

Correct Answer

verifed

verified

What does the following statement mean? Num1,num2 = get_num()


A) The function get_num() is expected to return a value for num1 and for num2.
B) The function get_num() is expected to return one value and assign it to num1 and num2.
C) This statement will cause a syntax error.
D) The function get_num() will receive the values stored in num1 and num2.

E) None of the above
F) All of the above

Correct Answer

verifed

verified

Arguments are passed by __________ to the corresponding parameter variables in a function.

Correct Answer

verifed

verified

A function definition specifies what a function does and causes the function to execute.

A) True
B) False

Correct Answer

verifed

verified

The math function ceil(x)returns the smallest integer that is greater than or equal to x.

A) True
B) False

Correct Answer

verifed

verified

A(n) __________ chart is also known as a structured chart.


A) flow
B) data
C) hierarchy
D) organizational

E) A) and B)
F) A) and D)

Correct Answer

verifed

verified

The code for a function is known as a function ___________.

Correct Answer

verifed

verified

A __________ variable is created inside a function.


A) global
B) constant
C) named constant
D) local

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

The randrange function returns a randomly selected value from a specific sequence of numbers.

A) True
B) False

Correct Answer

verifed

verified

A variable is available only to statements in the variable's __________.

Correct Answer

verifed

verified

What type of function can be used to determine whether a number is even or odd?


A) even
B) odd
C) math
D) Boolean

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

What will be displayed after the following code is executed? What will be displayed after the following code is executed?   A)  12 B)  9 C)  14 D)  Nothing, this code contains a syntax error.


A) 12
B) 9
C) 14
D) Nothing, this code contains a syntax error.

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

What is a group of statements that exists within a program for the purpose of performing a specific task?


A) a function
B) a subtask
C) a process
D) a subprocess

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Showing 21 - 40 of 66

Related Exams

Show Answer