MAE 3403 Computer Methods in Analysis and Design Assignment

Assignment Help Python Programming
Reference no: EM132775343

MAE 3403 Computer Methods in Analysis and Design - Oklahoma State University

Description:

We are analyzing data read from a thermocouple that measures the temperature in a chemical reactor (i.e., a round bottom flask or beaker) that is being heated to cause an endothermic (i.e., absorbs heat) reaction. The reaction rate varies with temperature and, due to environmental conditions beyond our control, the temperature of the reactor varies somewhat over time.

The functions described below are intended to a.) determine if a value lies between a minimum and maximum, b.) remove "outlier" temperatures from sets of data collected during individual experiments, c.) calculate the sample mean and standard deviation of temperature for each experiment, and d.) calculate the maximum, minimum and average reaction rate predicted for each experiment.

To Do:

You should write four different functions in addition to a function named main(), which you can simply copy from the HW1-Stem.py on Canvas. All of your code should be in a single Python file named HW1- SP21.py . You will test your functions using the particular numerical values given in the main() function.

When we grade your assignment, we will run your program with those given numerical values, looking for correct answers. Then we will change the numerical values (including changing the SIZES of the arrays) and look for correct answers for those modified values as well. We will only use numerical values and array sizes that make sense. We will not be testing your program to see how it handles bad data.

In this assignment, you must use: variables, loops, if statements, your own function definitions and function calls. Y ou must include reasonable comments in your code. For now, you may not use any of the powerful functions available in python modules, with one exception: you may import functions from the math module.
a) Write a function defined as: def ClampInclusive(val, minval, maxval): val: is a floating point number
minval, maxval: are the minimum and maximum values the val can have.
return TF: where TF is a boolean (True or False) indication of val is between minval and
maxval (inclusive)


b) Write a function defined as: def RemoveOutliers(vals, mean, stdev):

vals: a list of lists (i.e., 2-D-matrix) containing temperatures read from a thermocouple. Each list is the result of an experiment and may contain outlier data.
mean: the average temperature read by the thermocouple over time
stdev: the standard deviation of data read by the thermocouple
return trimmed: where trimmed is a list of lists (i.e., 2-D matrix) where each row contains the temperature data considered valid by being within 2*stdev of the mean.
c) Write a function defined as: def SampleEstimators(vals): vals: an array (list) containing temperature readings.
return stats: stats is a list containing the sample mean and standard deviation of the
temperature readings

d) Write a function defined as: def ReactionRate(T, P, EA NStDev=2):

T: is a list containing the average and standard deviation of the temperature for a reaction in oC.
P: is a reaction rate coefficient in mol/min-1.
EA: is the activation energy for the reaction in kJ/mol
NStDev: is the number of standard deviations from the mean for which we want to calculate the maximum and minimum reaction rates according to the formula:
Rate = P.e(-EA/R.T) where R = 8.3145 J/mol⋅K
return RateRange: where RateRange is a list of the minimum, maximum and average reaction rates we can expect from the given distribution of temperature.

Use HW1-stem.py as a starting point to test the four functions defined above. When you upload your program, it must include defined main function and call to main(). An additional requirement of this homework is that you understand EVERY LINE of this main program. If you don't understand something, Google it or ASK Dr. Smay or the TA.

Attachment:- PYTH_HW.rar

Verified Expert

This assignment is of Python programming in which we create four different functions for the data processing.The program uses for loop, lists, and standard math package.

Reference no: EM132775343

Questions Cloud

What amount should the note receivable from xxx corp : The present value of annuity of 1 at 8% for five year is 3.9927. At what amount should the note receivable from XXX Corp. be reported at year-end?
Explain the necessity of producing a new vaccine : Explain the necessity of producing a new vaccine for each year's flu season.
Which is not a potential benefit of a merger : Which is not a potential benefit of a merger? Tax loss carry-forward might be available in a merger if one of the firms has previously sustained a tax loss.
What is the present value of the project for company : What is the present value of the project? A company has a project with an initial after-tax cash savings of $40,000 at the end of the first year.
MAE 3403 Computer Methods in Analysis and Design Assignment : MAE 3403 Computer Methods in Analysis and Design Assignment Help and Solution, Oklahoma State University - Assessment Writing Service
What balance of dino capital immediately after withdrawal : If Dino purchases Dolor's interest for P32,000 and no asset revaluation is recorded, the balance of Dino capital immediately after the withdrawal of Dolor is
Describe how isolated culture obtained : Describe how isolated culture obtained using streak plate method should be maintained (transferred).
What amount of income from investment crown company : What amount of income from investment should crown company assuming it does not hold any interest in the preference shares of royal company?
How much must be invested today in order to generate : How much must be invested today in order to generate a 5-year annuity of $1,000 per year, with the first payment 1 year from today

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd