Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
kWh calculator
+1
Author: underlineyou
Dark
Public
Save
PY
py
1
2
3
4
5
6
7
#Metric units in use
potence = int(input())
#^In Watts(W)
h_per_day = float(input())
d_per_mo = 30
monthly_kWh = int((potence * h_per_day * d_per_mo)
/1000)
print(str(monthly_kWh) + "kWh")
OUTPUT