You cant, if you want to change you can create another account :)
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>
Answer:
D
It's technically a computer and some people may not realize it.
Answer:
Running time of algorithm is O(n).
Explanation:
n is power of 2
n =2,4,8,16,32,...................................
A is an array having n elements
B is an array of size 0 to (n/2)-1
if n=4 B then (4/2)-1 =1 So B has size 2
for(i=0;i<=(n/2)-1;++)
{
B[i]=A[2i]+A[2i+1];
}
This for loop will run n/2 times so complexity in terms of Big Oh is O(n/2) =O(n)
Running time of algorithm is O(n).
Answer: In 1991, the same year that Berners-Lee created his web browser, the Internet connection service Q-Link was renamed America Online, or (AOL) for short.
I hope this helped!