you can enclose such strings in triple quotes.
-
Which of the following statements is false?
Set method add inserts its argument if the argument is not already in the set; otherwise, the set remains unchanged.
Set method remove removes its argument from a set. A KeyError occurs if the value is not in the set.
Method discard also removes its argument from a set but does not cause an exception if the value is not in the set.
You can remove the first element of a set with pop.
2 points
QUESTION 33
-
Which of the following statements is false?
The while statement allows you to repeat one or more actions while a condition remains True.
The following code sets product to the first power of 2 larger than 64:
product = 2
while product < 64:
product = product * 2Something in a while statement’s suite must ensure that the condition eventually becomes False. Otherwise, a logic error called an infinite loop occurs.
In applications executed from a Terminal, Command Prompt or shell, type Ctrl + c or control + c (depending on your keyboard) to terminate an infinite loop.
2 points
QUESTION 34
-
Which of the following statements is false?
You may perform arithmetic operations and augmented assignments between arrays of the same shape.
Arithmetic between arrays of integers and floating-point numbers results in an array of integers.
You can compare arrays with individual values and with other arrays. Comparisons are performed element-wise. Such comparisons produce arrays of Boolean values in which each element’s True or False value indicates the comparison result.
The expression numbers >= 13 uses broadcasting to determine whether each element of numbers is greater than or equal to 13.
2 points
QUESTION 35
-
Which of the following statements is false?
A string delimited by single quotes may include double-quote characters:
print(‘Display “hi” in quotes’)
A string delimited by double quotes may include single quote characters:
print(“Display the name O’Brien”)
A string delimited by double quotes may not include double quotes.
To avoid using ‘ and ” inside strings
https://bestqualitywriters.com/wp-content/uploads/2020/09/logo-1-300x41.png 0 0 admin https://bestqualitywriters.com/wp-content/uploads/2020/09/logo-1-300x41.png admin2022-10-16 10:43:052022-10-16 10:43:05you can enclose such strings in triple quotes.