Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.64 KB

File metadata and controls

41 lines (31 loc) · 1.64 KB

Morocco Flag with Python Turtle 🇲🇦

Python Library License

A clean and precise Python implementation of the Moroccan National Flag using the turtle graphics library. This project demonstrates how to use coordinate-based drawing and geometric logic to recreate the iconic red field and the green pentagram (Seal of Solomon).

📖 Table of Contents


🔍 Overview

Inspired by a deep love and pride for my country, this project recreates the Flag of Morocco using Python’s Turtle Graphics library.

✨ Features

  • Dynamic Drawing: Watch the "turtle" draw the star and fill the background in real-time.
  • Mathematical Precision: Uses specific angles and distances to ensure a perfect pentagram.
  • Lightweight: No heavy external dependencies required (uses standard library).

🛠 Prerequisites

To run this project, you only need Python installed on your system. The turtle module is part of the Python Standard Library.

  • Python 3.x
  • A graphical environment (Windows, macOS, or Linux with Tkinter support)

🚀 Installation & Usage

  1. Clone the repository:
    git clone [https://github.com/hlnajz/moroccan-flag-python.git](https://github.com/hlnajz/moroccan-flag-python.git)
    cd moroccan-flag-python
  2. Run the script:
python morocco.py