Run the setup cell
Solve each exercise in the provided empty cell. If you wish you can insert additional cells.
import numpy as np
import matplotlib.pyplot as plt
E1 (5 pts)
Given the list of numbers in file data1.txt, write a program to find and print the highest/largest number.
E2 (10 pts)
Modify your solution in E1 to find and print the sum of the two largest numbers.
E3 (5 pts)
Create a text file named even.txt containing the first 10 even numbers, one per line. To verify that your
file is correct, open and print the file contents to the screen.
E4 (10 pts)
Open the file macbeth.txt and
print the number of lines with text - that is excluding empty lines
print the total number of characters in the file (hint: this number should be the same as the file
E5 (10 pts)
Use the function extract_data from chapter 11 to extract the data in file data2.txt. Use matplotlib to plot y
vs t, where y are the rainfall values and t are the months of the year (1 through 12). In your plot add labels
a title and any other decoration you may find useful.
Purchase answer to see full attachment