Alx Holberton's curriculum for high-level programming include the following projects that are meant to help us learn how to use and apply the basic fundamental concepts from low-level programming in C on a different programming language - Python.
- 0x00. Python - Hello, World
- 0x01. Python - if/else, loops, functions
- 0x02. Python - import & modules
- 0x03. Python - Data Structures: Lists, Tuples
- 0x04. Python - More Data Structures: Set, Dictionary
- 0x05. Python - Exceptions
- 0x0B. Python - Input/Output
- The first line of all files is exactly
#!/usr/bin/python3
- The code uses the pycodestyle (version 2.8.*)
- All modules are properly documented
- All classes are properly documented
- All functions are properly documentated
- All the files end with a new line
- All the files are/should be executable
- All the files can be interpreted/compiled on using python3 (version 3.8.5)
- The first line of all files is exactly
#!/bin/bash
- All the files end with a new line
- All the scripts are exactly two lines long (
wc -l file
should print 2) - All the files are/should be executable
- No global variables were used
- No more than 5 functions per file
- The code uses the Betty style.
- All the files end with a new line
- The prototypes of all functions are included in the header file called
lists.h
- All the header files are include guarded
- All test files are inside a tests folder
- All test files are text files (extension: .txt)
- All tests are executable using this command:
python3 -m doctest ./tests/*
- All modules are properly documented
- All functions are properly documentated
- All the files end with a new line
- Only one line
- No Shebang
- All the files end with a new line
- All test files are inside a tests folder
- Make use of the unittest module
- All test files are python files (extension: .py)
- All test files and folders start with test_
- File organization in the tests folder is the same as your project: ex: for
models/base.py
, unit tests must be in:tests/test_models/test_base.py
- All tests are executable using this command:
python3 -m unittest discover tests
- Test file by file by using this command:
python3 -m unittest tests/test_models/test_base.py
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Igbinijesu Samuel - Samuel-IG16