Question: Having trouble incorporating a loop to my python code i have to ask the user Do you want to calculate another population? example: while
Having trouble incorporating a loop to my python code i have to ask the user Do you want to calculate another population?" example:
while uservalue q:
Here are the rules:
You must use a loop to repeat the births and deaths for each generation. Do not def statements, main, break, or lower
Your program should allow the user to repeat the calculations as many times as they wish as above Use a while loop for this. That part is kind of similar to the Bidding example below
import random
random.seed
keepbidding y
nextbid
# continues to bid until the user enters n
while keepbidding n:
nextbid nextbid random.randint
printfIll bid $nextbid
printContinue bidding? yn end
keepbidding input
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
