Write a Python code for three different tasks
- Status: Closed
- Prize: $70
- Entries Received: 11
- Winner: artkulak
I have three tasks/ questions that I need to solve by using Python. The level of code needs to be fairly easy. This is an urgent contest, and I would need answers by next Monday.
The three tasks are as follows:
Task 1: A Monetary Calculation
If you have $200 in your pocket, and you see a shelf with a long row of foobars priced at $1, $1.2, $1.44, $1.73 and so forth. Every foobar costs 20% more than the previous one. You buy one of each foobar, starting with the one that costs $1, until you can't afford the next foobar on the self (the foobars are ordered by price). How many foobars can you buy, and how much change will you get? Your task is to write a small routine to solve this problem, and report the results.
Note: Since we are talking about money (dollars and cents), there are only two decimals used in each price.
Task 2: Organizing Data
Attached you find a file ‘UK [login to view URL]’. This file contains temperature measurements for six weather stations located in the UK. What we are looking for is a single average temperature value for the UK for each day. The weights of the individual weather stations are:
Bice Norton 0.14
Please write a program that calculates daily average temperatures for the UK from the temperatures in the file, correcting for missing data as best as possible. Design the program in such a way that a new set of measurements can be processed easily and efficiently as new weather data come in.
Task 3: Data Analysis
In the residential sector, natural gas is used almost exclusively for space heating, cooking and water boilers. Residential gas demand therefore shows a strong seasonality and a dependence on cold weather.
Attached are two data files: Temperatures South [login to view URL] with daily average temperatures in degree Fahrenheit from 01/01/2013 to 03/31/2017 and Residential Demand South [login to view URL] with monthly residential gas demand in Billion cubic feet (Bcf) per month from January 2013 to December 2016.
Based on these data, create a residential natural gas demand forecast for January-March 2017. You get extra credit, if you can also provide us with an assessment of daily natural gas demand for each day during this period. Give an explanation of your methodology and a discussion of potential problems.
Hint: you might need to transform the temperature data for best results.
“Very professional, the work he provided was very clean and efficient. Will definitely consider hiring him again.”
solicia2018, United States.