Question

In: Computer Science

A chemist is performing four experiments and each experiment has five results. The results for each...

A chemist is performing four experiments and each experiment has five results. The results for each experiment are given in the following table. An experiment is considered successful if the average of the five test results for a given experiment is between 25 and 32. Using a nested loop, write a script that (Python):

- Compute and display the test results average for each experiment

- Indicate is the experiment was successful or not

1st Results 49.1 15.8 16.9 25.2 33.4
2nd Results 34.8 45.2 27.9 36.8 23.4
3rd Results 26.4 16.8 10.2 15.8 18.9
4th Results 26.9 19.5 42.9 42.5 27.4

Hint : Use lists to store each experiment results and a single list to store the entire table

Solutions

Expert Solution

If you have any doubts, please give me comment...

experiment_results = [[49.1, 15.8, 16.9, 25.2, 33.4], [34.8, 45.2, 27.9, 36.8, 23.4],

[26.4, 16.8, 10.2, 15.8, 18.9], [26.9, 19.5, 42.9, 42.5, 27.4]]

experiment_no = 1

isSuccessfull = True

for experiment in experiment_results:

    s = 0

    for result in experiment:

        s += result

    avg = s/len(experiment)

    print(experiment_no, end=':\t')

    for result in experiment:

        print(result, end='\t')

    print("%.2f"%avg)

    if avg<25 or avg>32:

        isSuccessfull = False

    experiment_no+=1

if isSuccessfull:

    print("Experiment was successful")

else:

    print("Experiment was not successful")


Related Solutions

Comment on the results of each of these recent experiments in light of the Old Friends...
Comment on the results of each of these recent experiments in light of the Old Friends hypothesis: a) A small group of Finnish children were matched at birth by age and relevant genotype, then followed to see if any developed autoantibodies typical of type I diabetes. Compared to matched healthy controls, the children who would develop T1D had markedly different gut microbiomes. Relative to those of matched healthy controls, rheir microbiomes were less diverse, more unstable, and became increasingly dominated...
There are four classical experiments provided below. Select one experiment. Evaluate the method of studying this...
There are four classical experiments provided below. Select one experiment. Evaluate the method of studying this topic. Do you agree with the conclusions? - Milgram's study on obedience - Asch's study of conformity - Zimbardo's Stanford Prison Experiment - Stanley Schacter's Fear and Affiliation Study
In an experiment, a chemist prepared two different buffer solutions. For each one, calculate the molarity...
In an experiment, a chemist prepared two different buffer solutions. For each one, calculate the molarity of the acid and the salt (conjugate base) in the solution. Then use the Henderson-Hasselbalch equation to calculate the expected initial molarity of each buffer. a) Buffer #1: 20.0 mL of 0.200 M acetic acid solution and 10.0 mL of 0.200 M NaOH solution. b) Buffer #2: 20.0 mL of 0.200 M acetic acid solution and 15.0 mL of 0.200 M NaOH solution.
For each of the following experiments, cite at least one example from each of the four...
For each of the following experiments, cite at least one example from each of the four kinds of systematic errors that could affect the experiment: to. A sphere that rolls on an inclined plane, and for which the distance and time spent traveling it are measured. yes. A simple pendulum used to measure the acceleration of gravity.
Students performing vinegar analyses made several mistakes in their experiments. Explain in detail how each error below will affect the final result (% weight of acetic acid in vinegar) of each student's experiment.
Students performing vinegar analyses made several mistakes in their experiments. Explain in detail how each error below will affect the final result (% weight of acetic acid in vinegar) of each student's experiment. Show all steps of logic followed in analyzing the effects of the mistake (remember that the experiment had two parts): 1.Student A used a wet beaker to transfer the NaOH solution to be standardized from its original container to the buret. 2.Student B did not fill the...
Students performing vinegar analyses made several mistakes in their experiments. Explain in detail how each error...
Students performing vinegar analyses made several mistakes in their experiments. Explain in detail how each error below will affect the final result (% weight of acetic acid in vinegar) of each student's experiment. Show all steps of logic followed in analyzing the effects of the mistake (remember that the experiment had two parts):   1.Student A used a wet beaker to transfer the NaOH solution to be standardized from its original container to the buret. 2.Student B did not fill the...
a. given the results of your own experiment, can you conclude the results of each coin...
a. given the results of your own experiment, can you conclude the results of each coin were independent? (show your supporting work) b. using the compiled results, can you conclude the results of each coin were independent? (show your supporting work) Note: its about interpreting the results. my own results: 2nd coin heads 2nd coin tails 1st coin heads 8 12 1st coin tails 16 14 compiled results: 2nd coin heads 2nd coin tails 1st coin heads 188 214 1st...
A factory that manufactures bolts is performing a quality control experiment. Each object should have a...
A factory that manufactures bolts is performing a quality control experiment. Each object should have a length of no more than 17 centimeters. The factory believes that the length of the bolts exceeds this value and measures the length of 56 bolts. The sample mean bolt length was 17.04 centimeters. The population standard deviation is known to be σ=0.22 centimeters. What is the test statistic z? What is the p-value? Does sufficient evidence exist that the length of bolts is...
A factory that manufactures bolts is performing a quality control experiment. Each object should have a...
A factory that manufactures bolts is performing a quality control experiment. Each object should have a length of no more than 20 centimeters. The factory believes that the length of the bolts exceeds this value and measures the length of 64 bolts. The sample mean bolt length was 20.06 centimeters. The population standard deviation is known to be σ=0.16 centimeters. What is the test statistic z? What is the p-value? Does sufficient evidence exist that the length of bolts is...
Provide a PARAGRAPH description of each of the three experiments below: 1.) Asch Conformity Experiment. 2.)...
Provide a PARAGRAPH description of each of the three experiments below: 1.) Asch Conformity Experiment. 2.) Milgram Obedience Experiment. 3.) The Stanford Prison Experiment. ALL THREE HAVE TO BE ANSWERED TO EARN CREDIT.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT