Examples of program conversion temperature in Python

Examples: temperature conversion

( 1) analysis of the problem: using temperature conversion program, the input temperature value by the user, the program gives the output; monitor automatically given through voice recognition, image recognition and the like to obtain the temperature information distribution channels (such as radio, television) temperature broadcast data source, and then loaded by the program change after losing to the user; as the Internet convenient and highly universal access, the program can also receive regular temperature value from the temperature information publishing site, then convert the temperature information to travelers familiar way .

( 2) division boundary: a clear data input problem, and output data required for data processing. Since the program may be received Fahrenheit and Celsius, and conversion, IPO the functions described below .
Input : Fahrenheit or Celsius temperature values with signs of
treatment : select the appropriate algorithm according to the temperature of the temperature conversion flag

Output : flag with Celsius or Fahrenheit temperature values

( 3) Design Algorithm: definition Fahrenheit and Celsius, the temperature of the system are two to the freezing point and the boiling point of water at 1 atm at a temperature boundary, the algorithm:

C=(F-32)/32

F=C*1.8+32

( 4) program:

 

( 5) Debug test:

 

( 6) upgrade and maintenance: any program that has a life cycle, requires constant maintenance and upgrades.

 

Guess you like

Origin www.cnblogs.com/cyt99/p/11519751.html