Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 1 (of 3 ) Create a Python function named Stats that: - Has one input argument: a list of numerical values of any length.
Task 1 (of 3 ) Create a Python function named Stats that: - Has one input argument: a list of numerical values of any length. - Calculates the average and standard deviation for the data in the list. Note: use the equations given in class (and loops) to make the calculations - do not use the functions from the Python Statistics Library. - Returns the average and standard deviation. Note: when computing standard deviation use the equation for a sample, not a population. Test Value: Stats ([2,4,7,10,16,17,20]) should return an average and standard deviation of: (10.857142857142858,6.938505396903366) Task 2 (of 3 ) Antoine's Equation describes the relationship between vapor pressure and temperature for a pure substance. The equation is: log10(P)=A(C+T)B P= vapor pressure (mmHg) T= temperature (C) A,B,C are constants that depend on the substance The table below lists the constants, A, B, and C, for three substances. It also lists the temperature range (Tmin to Tmax) for which Antoine's equation is valid. The table below lists the constants, A, B, and C, for three substances. It also lists the temperature range (Tmin to Tmax) for which Antoine's equation is valid. Create a Python script, - Prompt the user for the substance (Methanol, Butane, or Octane) - Check to make sure the substance entered is valid. If not, continue to prompt until a valid substance is entered. - Create a list of twenty temperatures evenly spaced ranging from Tmin to Tmax given in the table above: Tmin, Tmin+T,Tmin+2T,Tmin+3T,... Tmax where T=(TmaxTmin)/19 Note: a loop will certainly prove useful for creating the list of temperature. The list of temperatures will be different for each substance. - Using Antoine's Equation, calculate and create a list of the vapor pressures corresponding to each temperature in the list. - Output each temperature and the corresponding vapor pressure using 3 places behind the decimal and including units. Use a loop for this - don't just output the entire list of temperatures following by the entire list of pressures. - Using Antoine's Equation, calculate and create a list of the vapor pressures corresponding to each temperature in the list. - Output each temperature and the corresponding vapor pressure using 3 places behind the decimal and including units. Use a loop for this - don't just output the entire list of temperatures following by the entire list of pressures. Sample Output (Partial): Substance: Methanol Temperature =16.000(C); Pressure =10.128(mmHg) Temperature =10.368(C); Pressure =15.126(mmHg) Temperature =4.737(C); Pressure =22.157(mmHg) Temperature =0.895(C); Pressure =31.879(mmHg) Temperature =6.526(C); Pressure =45.108(mmHg) Task 3 (of 3 ) Develop a Python script; - Create a 2d list of Resistor Values: R=[[100,200],[810,560],[470,360]] - Using a loop, for each row in R, compute the resistance if the two resistors are combined in series and save the results in a list. - Using a loop, for each row in R, compute the resistance if the two resistors are combined in parallel and save the results in a list. Note: can do this within same loop used to calculate series resistances. - Output each pair of resistor values and the corresponding series resistance and parallel resistance. Use one place behind the decimal point for the parallel resistance. Output: R1=100;R2=200; Rseries =300; Rparallel =66.7 R1=810;R2=560; Rseries =1370; Rparallel =331.1 R1=470;R2=360; Rseries =830; Rparallel =203.9
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started