Question: For this problem we will read in some parameters a text file and then write the answer to another text file. We will use NumPy.

For this problem we will read in some
parameters a text file and then write the answer to another text file. We will use NumPy.
You have been researching and came across an equation that describes discharge of a well
held at constant head as a function of time (td) and four parameters a,b,c, and d. The
equation is as follows:
Qd=a+bln(td)+clntdtd+dtd
a.(1 Point) You received a comma separated value file from your colleague. The file
has a header containing the parameter names. You want to use these values to
calculate the discharge of the well at 60 and a half days (td=60.5). Create a string
variable and set it equal to the csv file name.
b.(4 Points) Now use create a new variable called params and populate it using the
np.loadtxt () function to read in the parameters. ?** hint don't forget to set the
delimiter and skiprows parameters**
c.(1 Point) Use the print () function to print out the variable params (no complete
sentence required)
d.(1 Point) Create a variable for the time (td) and set it equal to 60.5
e.(3 points) Create the for parameter variables (a,b,c, and d) and set them to the
right values from the parameter file. ?** Hint use the [] to access the params list
f.(5 Points) Calculate the discharge at 60.5 days and store it to a new variable Q
For this problem we will read in some parameters

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 Programming Questions!