Answer:
Answer is in the provided screenshot! This was a lot of fun to make!
Explanation:
We need to create a new Array which has to be the size of amount * original - as we now that we are going to have that many elements. Then we just iterate through all the values of the new array and set them equal to each of the elements in order.
Ignore the code in my main function, this was to print to the terminal the working code - as you can see from the output at the bottom!
<span>In the scenario in which the IT department is reporting that a company web server is receiving an abnormally high number of web page requests from different locations simultaneously the DDoS security attack is occurring.
</span>DDos stands for Distributed Denial of Service<span> . This </span><span>attack is an attempt to make an online service unavailable by overwhelming it with traffic from multiple sources.</span>
The fourth choice is correct.
Answer:
def sum_cubes(n):
if n == 1:
return 1
else:
return n * n * n + sum_cubes(n-1)
print(sum_cubes(3))
Explanation:
Create a function called sum_cubes that takes one parameter, n
If n is equal to 1, return 1. Otherwise, calculate the cube of n, and add it to the sum_cubes function with parameter n-1
If we want to calculate the cubes of the first 3 numbers:
sum_cubes(3) = 3*3*3 + sum_cubes(2)
sum_cubes(2) = 2*2*2 + sum_cubes(1)
sum_cubes(1) = 1
If you substitute the values from the bottom, you get 27+8+1 = 36