-
Notifications
You must be signed in to change notification settings - Fork 0
/
power_calculator.py
39 lines (37 loc) · 1.08 KB
/
power_calculator.py
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
import customtkinter as ctk
from convertors_template import Convertor_template
power = Convertor_template(convertors_dict={
"Watts": {
"Kilowatts": "/1000",
"Megawatts": "/1000000",
"Gigawatts": "/1000000000",
"Horsepower": "*0.00134102209"
},
"Kilowatts": {
"Watts": "*1000",
"Megawatts": "/1000",
"Gigawatts": "/1000000",
"Horsepower": "*1.3404825737"
},
"Megawatts": {
"Watts": "*1000000",
"Kilowatts": "*1000",
"Gigawatts": "/1000",
"Horsepower": "*1341.022089595"
},
"Gigawatts": {
"Watts": "*1000000000",
"Kilowatts": "*1000000",
"Megawatts": "*1000",
"Horsepower": "*1341022.089595"
},
"Horsepower": {
"Watts": "*745.699872",
"Kilowatts": "*0.745699872",
"Megawatts": "/1341.022089595",
"Gigawatts": "/1341022.089595"
}
},
convertors_list=["Watts", "Kilowatts", "Kilowatts", "Megawatts", "Gigawatts", "Horsepower"]
)
power.mainloop()