0
help in py?
SOLVED. Thanks for an amazing forum - always help to get for a newcomer as me in py :-) https://code.sololearn.com/cdrQ1c8T5fO8/#py
5 Answers
+ 6
mpsorensen ,
there seems to be an input() missing. do this:
...
kWh = float(input())
...
+ 4
Hi @Tibor Santa - thanks for reply. Actually just found out too. But amazing such little things can trouble soo much :)
Again - thanks for spending time on me! Hope you have a great new year!
+ 3
Add a comma inside your print statements, between the text and the number:
print("Cost for electricity in 2018 =", float(kWh * yr18 * 7.45 / 10))
+ 3
When you have multiple strings in a single print statement you have to separate them with a comma or concatenate them with a plus sign. Examples:
print("a", "b")
print("a" +"b")
Notice that in the first case python inserts a space by default (you can override this behaviour). In the second case if you want spaces you have to provide them inside the quotation marks.
+ 2
hey lothar, yeah thanks - was preparing it now... just need to figure out how to poste on a webpage now haha. hope u also have a nice new year!