1. Other
  2. Other
  3. project 3 population trackerandnbspandmiddotandnbspandnbspandnbspandnbspandnbspandnbsplearning objective using python repetition and loop...

Question: project 3 population trackerandnbspandmiddotandnbspandnbspandnbspandnbspandnbspandnbsplearning objective using python repetition and loop...

Question details

Project 3: Population Tracker

 

·      Learning Objective: Using Python Repetition and Loop Statements

 

Problem Description

 

Write a Python program that predicts the approximate size of a population of organisms.

 

The application should use text boxes to allow the user to enter the following information:

 

o   starting number of organisms, 

o   the average daily population increase (as a percentage), and 

o   the number of days the organisms will be left to multiply. 

 

 

For example, assume the user enters the following values: 

 

Starting number of organisms: 2 

Average daily increase: 30% 

Number of days to multiply: 10

The program should display the following table of data

 

 

for example: can you solve it using similar to the below technique. basic python techniques

# Declare variables for the distance, speed, and time.
distance = 0
speed = 0.0
time = 0
# Get the speed as input from the user.
speed = float(input('Enter the speed of the vehicle in kph: '))
# Get time traveled and convert to integer for full hours.
time = int(input('Enter the number of hours traveled: '))
# Display the distance traveled by hour.
print ('Hour\tDistance Traveled')
print ('------------------------')
for hour in range(1, time + 1):
    distance = hour * speed#

print (hour, '\t',distance)

Enter the speed of the vehicle in kph: 80
     Enter the number of hours traveled: 20
     Hour    Distance Traveled
     ------------------------
  1. 1  80.0

  2. 2  160.0

  3. 3  240.0

  4. 4  320.0

  5. 5  400.0

  6. 6  480.0

  7. 7  560.0

  8. 8  640.0

  9. 9  720.0

  10. 10  800.0

  11. 11  880.0

  12. 12  960.0

  13. 13  1040.0

  14. 14  1120.0

  15. 15  1200.0

  16. 16  1280.0

  17. 17  1360.0

  18. 18  1440.0

  19. 19  1520.0

  20. 20  1600.0

variables for the distance, speed, and t

ime.distance = 0speed = 0.0time = 0# Get the speed as input from the user.speed = float(input('Enter the speed of the vehicle in kph: '))# Get time traveled and convert to integer for full hours.time = int(input('Enter the number of hours traveled: '))# Display the distance traveled by hour.print ('Hour\tDistance Traveled')print ('------------------------')for hour inrange(1, time + 1): distanc

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution