electriccitybillpredictor 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/electiccitypredictor.rb +6 -2
- metadata +1 -1
data/lib/electiccitypredictor.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
class Electiccitypredictor
|
2
2
|
|
3
3
|
def yearlyconsumption_onrooms(matter)
|
4
4
|
consumption = matter
|
@@ -16,7 +16,9 @@ module Electiccitypredictor
|
|
16
16
|
a = gets.chomp.to_i
|
17
17
|
b = (consumption*a)/12
|
18
18
|
c = b*cost
|
19
|
-
|
19
|
+
puts "Monthly consumption of a #{a} BHK rooms in terms of power consumption is #{b} KWH and the cost is #{c}"
|
20
|
+
|
21
|
+
return b,c
|
20
22
|
end
|
21
23
|
def consumption(appliances,cost)
|
22
24
|
appconsumed = appliances
|
@@ -54,3 +56,5 @@ def consumption(appliances,cost)
|
|
54
56
|
return value
|
55
57
|
end
|
56
58
|
end
|
59
|
+
|
60
|
+
|