Chat with us, powered by LiveChat IFT 194 CH 8.2 | Writedemy

IFT 194 CH 8.2

IFT 194 CH 8.2

 

Do parts A, B, C below

 

This is a short brush up on some simple math that will then be converted into Python functions.

 

 

Scenario: You are to write two functions, one  that will convert from Celsius degrees to Fahrenheit,  and a second python function that converts Fahrenheit to Celsius. I will work through the first one with you.

 

 

 

 

 

 

 

 

To figure out (straight line) connection between Celsius and Fahrenheit, you can use two the pieces of data that you already know. Remember, all you need to determine a straight line is two known points. And, you already know these… 🙂

Since the connection between Fahrenheit and Celsius is a straight line, the

equation of a straight line, using these concepts is:

F = a + b * C

where a is the intercept and b is the slope

What is the intercept?? , well just look at the diagram→ when C =0, then F = 32, so the intercept is 32 ( i.e. ‘a’)

What is the slope ( rise over run)  ( 212 – 32 ) / (100 -0)= 180/100   = 1.8 , this is your ‘b

So,

F (degreesF) = 32 + 1.8 C(degreesC)

A. Now construct a python function to calculate F, where the parameter of the function is the ‘C’ value and the return from the function  is the ‘F’ value.

Use your function to calculate and include in this document the F value , when C = 13.65

 

B. Now draw another diagram with the horizontal axis being F and the vertical axis being C.

a). Draw the two known points and then draw the line between them.

Now, what are these  ‘a’ and ‘b’,  since now you want C in terms of F.

C. Construct the python function to calculate the degrees Celsius, given the degrees     Fahrenheit.

c)    Use your function to calculate and include in this document the C value , when F     = 13.65

 

 

 

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order