DEV Community

Cover image for This Exercise Helped me Fine tune My code from Complexity to Simplicity
Mihsa Idebus
Mihsa Idebus

Posted on Originally published at dev.to

This Exercise Helped me Fine tune My code from Complexity to Simplicity

Recently on doing exercise for python I started doing Marking the Grade Problem. At start i was confused on how i can do it and so started simply doing it. By the time i did it for first time i had made my code overly complex for a simple task. You can check below.
Image description
Using dictionary comprehension and all.

But after a few trial and error to make it simpler when i did make it better i myself found my first code incomprehensible.
Image description
Doing code was much harder than spoon feeding tutorials and a efficient code required deep understanding of concepts and how i can apply different concepts together.
https://exercism.org/tracks/python/exercises/making-the-grade/solutions/Scorch119

Top comments (0)