Earn Achievements while learning how to code
Project description
dev-achievements
Earn Achievements while learning how to code
Game-ify your experience while learning to code and get achievements for different concepts as you use them. Start off at a simple print
statement and work your way up to functions
and classes
(and more to come).
Example
Just import
the package at the top of your script (example):
# my_script.py
import dev_achievements
def cumulative_sum(x):
# calculates sum of numbers from 0 to x
total = 0
for i in range(x):
total += i
return total
result = cumulative_sum(4)
print('value: ', result)
And run it in terminal as you normally would:
$ python3 my_script.py
┌──────────────────────────────────┐
│ Achievement Unlocked: Loops! │
│ Achievement Unlocked: Functions! │
└──────────────────────────────────┘
value: 6
Usage
- Install the package with
pip install dev_achievements
- Use
import dev_achievements
at the top of your script - Run your
python
script as normal
Some things to note
- Currently this only works on single file scripts - if you import your own module (e.g. for utility functions) that module will not be parsed (planning on fixing this though)
- Some achievements have dependencies, and will only be unlocked once previous ones have been unlocked
- Unlocked achievements will remain unlocked, so those "Achievement Unlocked" messages will should only show once per achievement
Future plans and contributing
- The bare bones achievements are currently implemented (using
"hello world"
,for
loops,lists
,functions
, etc.) - more achievements are in development (see issue #1) - More details on how to contribute (along with code docs to help with the development process) are coming soon
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dev_achievements-1.0.1.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for dev_achievements-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfae329be0274f0b9f20405afdc071bfd8cf497c803bb266fa1012f7ea0d6618 |
|
MD5 | e26ab7b92c92007f73fa57c915932731 |
|
BLAKE2b-256 | 4c5b99102a28373d11c0f19455dd5c7a0134168fe4374aaabe67015682b94884 |