Filters
Question type

Study Flashcards

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

Correct Answer

verifed

verified

The approach called _______________ is taking a large task and dividing it into several smaller tasks that are easily performed.

Correct Answer

verifed

verified

In Python, there is no restriction on the name of a module file.

Correct Answer

verifed

verified

To assign a value to a global variable in a function, the global variable must first be declared in the function.

Correct Answer

verifed

verified

What is the result of the following statement? X = random.randint(5, 15) * 2


A) A random integer from 5 to 15, multiplied by 2, assigned to the variable x
B) A random integer from 5 to 15 assigned to the variable x
C) A random integer from 5 to 15, selected in 2 steps, assigned to the variable x
D) A random integer from 5 to 15, raised to the power of 2, assigned to the variable x

Correct Answer

verifed

verified

The math function, atan(x), returns one tangent of x in radians.

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

Correct Answer

verifed

verified

Python function names follow the same rules for naming variables.

Correct Answer

verifed

verified

A(n) _____ constant is a global name that references a value that cannot be changed.


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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

In a flowchart, a function call is depicted by a(n) _______________ that has vertical bars.

Correct Answer

verifed

verified

Functions in the standard library are stored in files that are known as _______________.

Correct Answer

verifed

verified

A value-returning function is _____.


A) a single statement that perform a specific task
B) called when you want the function to stop
C) a function that will return a value back to the part of the program that called it
D) a function that receives a value when it is called

Correct Answer

verifed

verified

A(n) _____ variable is created inside a function.


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

Correct Answer

verifed

verified

The top-down design breaks down the overall task of the program into a series of _______________.

Correct Answer

verifed

verified

It is recommended that programmers should avoid using _____ variables in a program when possible.


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

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 each for num1 and num2.
B) The function get_num() is expected to return a value and assign it to num1 and num2.
C) Statement will cause a syntax error.
D) Statement will cause a run-time error.

Correct Answer

verifed

verified

The function header marks the beginning of the function definition.

Correct Answer

verifed

verified

The function header begins with the keyword _______________ followed by the name of the function.

Correct Answer

verifed

verified

The hierarchy chart shows all the steps that are taken inside a function.

Correct Answer

verifed

verified

Showing 21 - 40 of 69

Related Exams

Show Answer