Create the computer, network, and communication systems that an organization needs
Answer:
The answer is option A.
Explanation:
Negative numbers can be found by binary search, this makes option B incorrect.
Unsorted and randomized lists are also not things that support a binary search, options C and D are incorrect.
Binary search uses a technique where the middle element of the list is located and used to determine whether the search should be done within the lower indexed part of the list or the higher. So for a list to be binary search-able, it should be sorted and not randomized.
The answer is A.
I hope this helps.
Answer:
Like a load of batteries
Explanation:
" I have a load of crayons", "I found a load of tires". Hope this helps
Answer:
a
Explanation:
your answer is the first one
Answer:
All functions were written in python
addUpSquaresAndCubes Function
def addUpSquaresAndCubes(N):
squares = 0
cubes = 0
for i in range(1, N+1):
squares = squares + i**2
cubes = cubes + i**3
return(squares, cubes)
sumOfSquares Function
def sumOfSquares(N):
squares = 0
for i in range(1, N+1):
squares = squares + i**2
return squares
sumOfCubes Function
def sumOfCubes(N):
cubes = 0
for i in range(1, N+1):
cubes = cubes + i**3
return cubes
Explanation:
Explaining the addUpSquaresAndCubes Function
This line defines the function
def addUpSquaresAndCubes(N):
The next two lines initializes squares and cubes to 0
squares = 0
cubes = 0
The following iteration adds up the squares and cubes from 1 to user input
for i in range(1, N+1):
squares = squares + i**2
cubes = cubes + i**3
This line returns the calculated squares and cubes
return(squares, cubes)
<em>The functions sumOfSquares and sumOfCubes are extract of the addUpSquaresAndCubes.</em>
<em>Hence, the same explanation (above) applies to both functions</em>