No student devices needed. Know more
4 questions
The program below is intended to count the number of prime numbers in a list called numbers and display
the result. The program uses the procedure is Prime (n), which returns true if n is a prime number and false otherwise.
The program does not work as intended.
Which two lines of code should be removed so that the program will work as intended?
Select two answers.
line 1
line 4
line 7
line 9
Which of the following statements describe how cloud computing has affected Internet communication?
Select two answers.
Cloud computing has eliminated the need to provide redundancy in Internet routing.
Cloud computing has helped enhance collaboration.
Cloud computing has introduced new data-security concerns.
Cloud computing has reduced concerns about intellectual property rights.
A program is created to perform arithmetic operations on positive and negative integers. The program contains the following incorrect procedure, which is intended to return the product of the integers x and y. A programmer suspects that an error in the program is caused by this procedure. Under which of the following conditions will the procedure NOT return the correct product?
Select two answers.
When the values of x and y are both positive.
When the value of x is positive and the value of y is negative.
When the value of x is negative and the value of y is positive.
When the values of x and y are both negative.
The procedure Smallest is intended to return the least value in the list numbers. The procedure does not work as intended. For which of the following values of theList will Smallest (theList) NOT return the intended value?
Select two answers.
theList ← [10, 20, 30, 40]
theList ← [20, 10, 30, 40]
theList ← [30, 40, 20, 10]
theList ← [40, 30, 20, 10]
Explore all questions with a free account