GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Some say that the mosquito is the unofficial state bird of M…

Some say that the mosquito is the unofficial state bird of Minnesota! As a data scientist planning a summer evening picnic at one of our wonderful parks, there is only one logical way to predict how bad the mosquitoes will be at meal time: build a predictive model. Prompt the user for a starting number of mosquitoes, an hourly growth rate (expressed as a percentage), and the number of mosquitoes you think you can swat per hour. Calculate and display a table, starting from noon, showing the mosquito population over a 24-hour period. If at any point in the 24-hour period you are able to swat all of the mosquitoes, you win. However, if any mosquitoes remain after 24 hours, then the insects win the day. Mosquitoes come in whole numbers. Half a mosquito is not going to bite anyone, so each hour, add the new mosquitoes, which is the population times the growth percent divided by 100 with any fraction dropped, then subtract the swatted ones. Use integer division, or truncate the result, so your numbers match the sample runs. If the swatting takes the count below zero, show 0. A swatted mosquito is not coming back. Starting mosquitoes: 1000 Hourly growth % (ex. 50): 10 Swatted each hour: 140 Hour Mosquitoes —- ———- 12 1000 13 960 14 916 15 867 16 813 17 754 18 689 19 617 20 538 21 451 22 356 23 251 24 136 01 9 02 0 You win! Here is a run where the mosquitoes win: Starting mosquitoes: 100 Hourly growth % (ex. 50): 50 Swatted each hour: 45 Hour Mosquitoes —- ———- 12 100 13 105 14 112 15 123 16 139 17 163 18 199 19 253 20 334 21 456 22 639 23 913 24 1324 01 1941 02 2866 03 4254 04 6336 05 9459 06 14143 07 21169 08 31708 09 47517 10 71230 11 106800 Mosquitoes win! For full credit: Demonstrate understanding of the formatting techniques from your textbook and lecture. Avoid the use of tabs and any other technique not specifically covered in our material. Use only the techniques and concepts discussed in class so far. Specifically, use only those concepts covered in Chapters 1 through 3 and 5 of Python for Everybody and the associated lecture material and examples. There should be no need for lists, tuples, or dictionaries. Upload your .py script below before time expires.

Read Details

Corporations that are​ non-residents of Canada are required…

Corporations that are​ non-residents of Canada are required to file a Canadian income tax return if they​ ________.

Read Details

A biopsy (tissue examination) of a suspicious mole shows mal…

A biopsy (tissue examination) of a suspicious mole shows malignant melanocytes. From which layer of the skin do these cells originate? 

Read Details

Pelham  Inc. has been carrying on a business since 2011. On…

Pelham  Inc. has been carrying on a business since 2011. On November​ 1, 2026​, Pelham  Inc. acquires a franchise for  $ 38,000. The franchise has a limited life of 15  years. What is the maximum amount of capital cost allowance​ (CCA) that  Pelham Inc. can claim for its taxation year that ends December​ 31, 2026​?

Read Details

What movements are accommodated by plane joints? 

What movements are accommodated by plane joints? 

Read Details

In general terms, what are the only actions a single muscle…

In general terms, what are the only actions a single muscle can do? 

Read Details

Which muscle is used to dorsiflex the foot? 

Which muscle is used to dorsiflex the foot? 

Read Details

Which of the following is an example of fluid connective tis…

Which of the following is an example of fluid connective tissue? 

Read Details

Ignoring any income tax​ treaties, a corporation must be inc…

Ignoring any income tax​ treaties, a corporation must be incorporated in Canada and have its mind and management located in Canada in order to be a resident of Canada.

Read Details

Which muscle has fibers that run superior to inferior in the…

Which muscle has fibers that run superior to inferior in the abdomen and flexes the trunk? 

Read Details

Posts pagination

Newer posts 1 … 39 40 41 42 43 … 98,474 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top