Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
MATH6182
● Submissions will be strictly tested for plagiarism with specialised
software and penalties strictly enforced.
1.3. Purpose of assessment
The purpose of this assignment is to assess your ability to:
● Write a structured computer program.
● Demonstrate good programming practice, as discussed in the course
notes, lectures and computer workshops.
● Demonstrate good and correct use of Python.
1.4. Marking:
The Assignment will be marked automatically by Repl.it. Your mark is
the percentage of the passed unit tests.
2. Content
TASK 1:
You are given a data set of the US weather history (USweather_history.txt) for
one year (1/7/2014-30/6/2015). Your task is to find the actual hottest and
coldest days and their corresponding temperatures.
TASK 2:
You are given a spending sheet in a csv file including (name of users, date,
spending). User names are unique.
Your task is to
2.1 Find the total and mean of spending each user, then return the name of
the user who has the smallest mean and the name of the user who spends the
most in the whole data.
2.2 Find the day where users spend the most.
TASK 4:
Capital letters of the alphabet are assigned numerical value in order from -12
for A, to +13 for Z, i.e. A = -12, B=-11, C=-10 …..Y=12 and Z=13.
Your input will consist of a string of capital characters in a single line. Your
function should return:
• the greatest total letter score which can be achieved from any
consecutive substring.
• the first and last characters from this maximal substring.
Example:
Input: GEUHRTANB
Output: 15, UT
Example explanation: The substring UHRT achieves the best score here.
It is worth 8 + -5 + 5 + 7 = 15. This is the greatest achievable substring score
from any consecutive substring. The first and last characters of this
substring are U and N. So 15 and UN are the outputs.
Note: If the first and last character of the substring are the same letter then
output it twice e.g. WW
Hints:
● Please include comments in your code to explain how it works; these
must be written in understandable English.
● You would need to use materials taken from lectures and computer labs
for this Assignment.
● You can use any built-in function from Python.