Question: Hello tutor! I need help with my CSE 101 Lab question #2. It involves using python. I use pycharm myself You lost money on this

 Hello tutor! I need help with my CSE 101 Lab question

Hello tutor! I need help with my CSE 101 Lab question #2. It involves using python. I use pycharm myself

You lost money on this sale 2 Estimating The World Popuiation (5 points) The wotcomic askod gives the tolowng formula to approximato the world population for a given year (trom 2000 onward) a. Obtain the last two digits of the year (this value is just the year modulo 100), b. Calculato the number of leap years ncluding the current yearn since Hurricane Katrina (2005) You can approximate this by dviding the diftterence in years by 5 thon adding 1 to the quotient. For example, it the current year is 2016, we subtract 2005 to get the ditorance (which is 11). We divide the differenco by 5 using floor division (11 W 5 beoomes 2). Finaly, we add 1 (giving us a final value of 3). c Subtract the resuft of step (b) from your answer to stop (a) d. Divide the previous resut by 10.0 (use regular division, not foor divieion). then add 6 to get your final answer. Stony Brook University CSE 101: Introduction to Computers (Section 01) Fall 2017 This gives the approximate world population in bilins of people Define a Python function named population that takes a singonteger argument representing a year (you may assume that the year is aways greater than or equal to 2000, Your function should use the tormula above to cakculate and retum a new numbor roprosenting the estimated world population for that year in bilions Finally, following your function defintion, wto some Python code that roads in a year from the user, calls your populat&on() function with that value, and prints the value returned by the function Sample Execution 1: (program output is shown in italcs, and user input is shown in boldface) Please enter the year 2001

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!