Which of the following statements is false?
a. Python stops evaluating an and-expression as soon as it knows whether the entire condition is False. Python stops evaluating an or-expression as soon as it knows whether the entire condition is True.
b. The following condition stops evaluating immediately if gender is not equal to 'Female' because the entire expression must be False. If gender is equal to 'Female', execution continues, because the entire expression will be True if the age is greater than or equal to 65.
gender == 'Female' and age >= 65
c. The following condition stops evaluating immediately if semester_average is greater than or equal to 90 because the entire expression must be True.
semester_average >= 90 or final_exam >= 90
d. In operator expressions that use and, make the condition that’s more likely to be True the leftmost condition—in or operator expressions, make the condition that’s more likely to be False the leftmost condition—each of these tactics can reduce a program’s execution time.
d. In operator expressions that use and, make the condition that’s more likely to be True the leftmost condition—in or operator expressions, make the condition that’s more likely to be False the leftmost condition—each of these tactics can reduce a program’s execution time.
You might also like to view...
Which statement is false?
a. Linked lists are collections of data items "lined up in a row"-- insertions and deletions can be made anywhere in a linked list. b. Insertions and deletions are made only at one end of a stack, its top. c. Insertions and deletions are made only at one end of a queue, its tail. d. Binary trees facilitate high-speed searching and sorting of data.
Using the Python interactive shell, put the elements of the list you instantiated in exercise 3 in alphabetical order.
What will be an ideal response?
The _________________________ provides convenient, one-tap or one-click access to frequently used commands.
Fill in the blank(s) with the appropriate word(s).
____________________ styles are applied to elements that only appear once on a page.
Fill in the blank(s) with the appropriate word(s).