/alx-higher_level_programming

Main repo for ALX Python projects.

Primary LanguagePython

ALX Higher-Level Programming

This repository contains my code submissions to tasks given while studying higher level programming in the ALX Software Engineering program. It contains Python, C and SQL code.


Table of contents

Technologies Used

The Python scripts were tested with Python 3.11.2 but are built using Python 3.8.X in a virtual environment as instructed.

  • GCC: Compiler for C/C++.
  • Make: Utility tool that I use for running repetitive commands.
  • Valgrind: A programming tool for memory debugging, leak detection and profiling.
  • Betty: Holberton-style C code checker written in Perl.
  • GDB: Command-line debugger that works with many low level languages including C/C++.
  • Oh-My-ZSH: A Unix shell, similar to Bash.
  • Neovim: An upgraded version of the VIM code editor.
  • Lunarvim: An IDE layer for Neovim with sane defaults. Completely free and community driven.
  • WSL: Windows OS feature, by Microsoft, that enables Linux to be run natively on Windows.
  • PyCodeStyle: Python style guide checker.

Some scripts need more specific requirements, but these will be shown where they are needed.

Projects

Here is the complete list of projects in this repository, each project has its description in its respective folder.

Usage

Each project and task contains the instructions to compile the code and execute the results. The Python version required for this project is 3.8.5 but most Linux systems come with more recent versions of Python. So I made use of a virtual environment created with the latest version of Python 3.8.X so that my default global Python still remains the latest version. Here is an outline of how to do that.

  1. Install the latest version of Python 3.8.X on your Linux. Follow this link for a guide.
  2. After its installed, you need to temporarily make it the default Python version. Follow this link for a guide on how to go about it. When you get to the part about editing the bash aliases file using sudo vi ~/.bash_aliases file, after opening the file, comment out any alias that was set there before (don't delete). Then add the alias for the Python version you just installed. When you save it and activate the alias using source ~/.bash_aliases, the default Python version will be changed. You can check with python3 --version.
  3. Now go to the root directory of this project and create a new virtual environment using python3 -m venv venv. This virtual environment will now be created using the default global Python version which we just set (version 3.8.X).
  4. After this, go back and edit the bash aliases file by running sudo vi ~/.bash_aliases then comment out the new aliases you added and comment back the initial one that was there, if any. After saving, activate the alias again using source ~/.bash_aliases and the default Python version that was there before will be set.
  5. Now you just need to activate the virtual environment in this project folder using source venv/bin/activate and install any requiremnets using pip3 install -r requirements.txt.

Inspiration

The format for the Readme files in this project was heavily inspired by Santiago Arboleda, a former student of Holberton School Software Engineering.