A local biologist needs a program to predict virus population growth. The inputs would be • the initial number of virus infected persons (num) • the rate of growth (a real number greater than 0) (rate) • the number of hours it takes to achieve this rate (hour) • and a number of hours during which the virus population grows (time) For example, one might start with a virus population (num) of 500 infected persons, a growth rate (rate) of 2, and a growth period (hour) to achieve this rate of 6 hours. Assuming that none of the infected persons die, this would imply that the population of infected persons would double in size every 6 hours. Thus after 6 hours (time in this case), we would have 1000 infected persons. Similarly for time=12 hours, we would have 2000 infected persons. Write a function virus_growth that takes these inputs and returns a prediction of the total population. For example: Test Result print (round(virus_growth (100,2,4,16),1)) 1600.0

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

please code in python
the question is in the image

A local biologist needs a program to predict virus population growth. The
inputs would be
• the initial number of virus infected persons (num)
• the rate of growth (a real number greater than 0) (rate)
• the number of hours it takes to achieve this rate (hour)
• and a number of hours during which the virus population grows (time)
For example, one might start with a virus population (num) of 500 infected
persons, a growth rate (rate) of 2, and a growth period (hour) to achieve this
rate of 6 hours. Assuming that none of the infected persons die, this would
imply that the population of infected persons would double in size every 6
hours. Thus after 6 hours (time in this case), we would have 1000 infected
persons. Similarly for time=12 hours, we would have 2000 infected persons.
Write a function virus_growth that takes these inputs and returns a prediction
of the total population.
For example:
Test
Result
print (round(virus_growth (100,2,4,16),1)) 1600.0
Transcribed Image Text:A local biologist needs a program to predict virus population growth. The inputs would be • the initial number of virus infected persons (num) • the rate of growth (a real number greater than 0) (rate) • the number of hours it takes to achieve this rate (hour) • and a number of hours during which the virus population grows (time) For example, one might start with a virus population (num) of 500 infected persons, a growth rate (rate) of 2, and a growth period (hour) to achieve this rate of 6 hours. Assuming that none of the infected persons die, this would imply that the population of infected persons would double in size every 6 hours. Thus after 6 hours (time in this case), we would have 1000 infected persons. Similarly for time=12 hours, we would have 2000 infected persons. Write a function virus_growth that takes these inputs and returns a prediction of the total population. For example: Test Result print (round(virus_growth (100,2,4,16),1)) 1600.0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Topological Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education