Code Challenge 21 - Electricity Cost Calculation App

PyBites, Mon 29 May 2017, Challenges

beginner, calculation, codechallenges, electricity, Flask, GUI, math, newquote, TkInter

A smooth sea never made a skilled sailor. - Franklin D. Roosevelt

Hi Pythonistas, a new week, a new 'bite' of Python coding! This week we will get you to create a simple app to calculate the monetary cost of using an electrical device. Enjoy!

The Challenge

The challenge is simple. We want you to create an app that will allow you to calculate the hourly cost of running an electrical device.

Basic Requirements:

This is the absolute baseline for beginners. We recommend you continue with the Bonus Features.

Bonus Features:

To make it interesting, see if you can complete the following:

Consider this a half specific, half open ended challenge. There’s an intentional, specific goal here but how you get there is up to you. If you’re a newbie and it takes time, feel free to leave this as a CLI based app.

It doesn’t matter how great it looks, only that you were challenged along the way and learned something!

Getting ready

See our INSTALL doc how to fork our challenges repo to get cracking.

This doc also provides you with instructions how you can submit your code to our community branch via a Pull Request (PR). We will feature your PRs in our end-of-the-week challenge review (previous editions).


If you have ideas for a future challenge or find any issues, please contact us or open a GH Issue.

Last but not least: there is no best solution, only learning more and better Python. Good luck!

Keep Calm and Code in Python!

-- Bob and Julian

PyBites Python Tips

Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.

Get our Python Tips Book

"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H

"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B

"This is now my favourite first Python go-to reference." - Anthony L

"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S

Get the book