Answer:
function currentPopulation = CalculatePopulation(numGeneration, initialPopulation)
i = 1;
currentPopulation = initialPopulation;
while(i <= numGeneration)
currentPopulation = 2* currentPopulation;
i= i+1;
end
end
Explanation:
- Assign 1 to i as an initial loop value
.
- Assign initialPopulation to currentPopulation variable.
- Run the while loop until i is less than numGeneration.
- Inside the while loop, double the currentPopulation variable.
- Inside the while loop, Increment the i variable also.
<span>When using a wireless connection, encryption translates data so that it has protection.</span>
Answer:
number = int(input("Enter a number: "))
sum = number
c = 1
while (sum<=100):
number = int(input("Enter a number: "))
sum = sum + number
c = c + 1
print("Sum: " + str(sum))
print("Numbers Entered: " + str(c))
Explanation:
Hope this helps lovely :)
Answer:
In algorithms, precomputation is the act of performing an initial computation before run time to generate a lookup table that can be used by an algorithm to avoid repeated computation each time it is executed.