-
-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathKonversi Suhu.py
More file actions
52 lines (36 loc) · 1.47 KB
/
Konversi Suhu.py
File metadata and controls
52 lines (36 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#program konvrensi celcius ke satuan lain
print("\nProgram Konvrersi Tempratur Celcius\n")
celcius = float(input("Masukan Suhu Dalam Celcius = "))
reamur = 4/5 * celcius
print("Suhu Reamur = ", reamur, "Reamur")
fahrenheit = 9/5 * celcius + 32
print("Suhu Fahrenheit = ", fahrenheit, "fahrenheit")
kelvin = 273 + celcius
print("Suhu Kelvin = ", kelvin, "kelvin")
#program konvrensi fahrenheit ke satuan lain
print("\nProgram Konvrersi Tempratur Fahrenheit\n")
fahrenheit = float(input("Masukan Suhu Dalam Fahrenheit = "))
celcius = 5/9 * (fahrenheit-32)
print("Suhu Celcius = ", celcius, "Celcius")
reamur = 4/9 * (fahrenheit - 32)
print("Suhu Reamur = ", reamur, "Reamur")
kelvin = (fahrenheit-32) * (5/9) + 273.15
print("Suhu Kelvin = ",kelvin,"Kelvin")
#program konvrensi kelvin ke satuan lain
print("\nProgram Konvrersi Tempratur Kelvin\n")
kelvin = float(input("Masukan Suhu Dalam Kelvin = "))
celcius = kelvin - 273
print("Suhu Celcius = ", celcius, "Celcius")
reamur = 4/5 * (kelvin - 273)
print("Suhu Reamur = ", reamur, "Reamur")
fahrenheit = (kelvin - 273.15) * (9/5) + 32
print("Suhu Kelvin = ",fahrenheit,"Fahrenheit")
#program konvrensi reamur ke satuan lain
print("\nProgram Konvrersi Tempratur Reamur\n")
reamur = float(input("Masukan Suhu Dalam Reamur = "))
celcius = 5/4 + reamur
print("Suhu Celcius = ", celcius, "Celcius")
fahrenheit = 9/4 * reamur + 32
print("Suhu Reamur = ", fahrenheit, "Reamur")
kelvin = 5/4 * reamur + 273
print("Suhu Kelvin = ",kelvin,"Fahrenheit")