By the Celsius and Fahrenheit temperature conversion to mind.

In the first lesson to learn Beijing Institute of Technology pytyon encountered a language programming exercises, so write a Celsius and Fahrenheit temperature conversion program, course put the conversion formula to tell me straight up. But I want to know is how come this formula? Why are defined by the conversion formula will be able to know it? This is the middle of something less certain.

 

I studied a little bit and found that this is so.

By definition the following key messages:

Defined degrees Fahrenheit melting point of ice is marked depression 32F, 212F boiling point of water is, the intermediate 32F to 212F average, every call 1F.

Celsius definition standard ice-water mixture is 0C Xia pressure, boiling point of water is 100C, the intermediate average 0C to 100C, is called every 1C.

 

In degrees Fahrenheit, the average score is what does that mean? The next number 32F 33F is it?

Means that the average difference between the first term and the second term is a constant, the difference between the third and the second term is a constant, the difference between the first term N N-1 and the first term is a constant, and the same constant. This constant is called tolerance arithmetic sequence.

The number of columns high school arithmetic knowledge, a1 = 32, a100 = 212, seeking an,

an = a1 + (n-1) * d, a100 to be obtained into the a1 and d = 1.8, so that an = 32 + (n-1) * 1.8

So we can put a table Fahrenheit listed

32  33.8  35.6  37.4  。。。212

 

By the same token, there Celsius for temperature

a1 = 0, a100 = 100, to obtain d = 1.0, so that an = 0 + (n-1) * 1.0

So we can put a table Celsius listed

0  1    2    3   。。。 100

 

We Fahrenheit temperature data above in a collection inside, this collection is called F, the data we Celsius above in a collection inside, this collection is called C.

F and C can be found in the collection is a collection of one to one relationship exists. We want to know what exactly is this relationship? Because both F or C inside the elements are out of the average, if there is a corresponding relationship,

We suspect that this use have a linear correspondence relationship, so we set F = m * C + n

Values ​​m n and requirements, the two unknowns, equations two, only two sets of data can be very simple, as when F = 32, C = 0, the time when F = 212, C = 100.

Get

32=n

212=m*100+n

Determined n = 32, m = 1.8

Into F = m * C + n have F = 1.8C + 32 or C = (F-32) /1.8

 

 

In fact, I am writing this article when it suddenly wanted high school math or lack of knowledge on a misunderstanding of the function of the relationship between high school before the y and x, y and x is just that there is some relationship between the number, and we put on the high school function Further seen is a collection of a set of relationships with the domain to range from, the University of multiplicative variation in the matrix, especially a matrix vector multiplication reflected particularly evident. Anyway, I did not learn to understand this point, thinking or stay in the relationship between the number of junior high school that the two variables above.

 

 

 

 

 

Finally there is a small exercise:

 

Guess you like

Origin www.cnblogs.com/yfish/p/11717455.html