Skip to content

Anuja-jayasinghe/percolation_demonstration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Percolation Demonstration

This project simulates a text-based percolation model in Python to demonstrate how a system "percolates" based on probability thresholds. It uses tabular representations to show simulation results in multiple formats including terminal (CMD), HTML, and plain text output.


๐Ÿ”ข Features

  • Simulates Percolation Logic:
    • Demonstrates how filled cells spread through a 2D grid.
    • Controlled by grid size and fill probability.
  • Multiple Output Formats:
    • View results in:
      • Command-line table
      • Generated HTML file
      • Plain text file
  • Readable Tabular Output:
    • Uses the prettytable library for clean, structured display.

๐Ÿ’ป Technologies Used

  • Python 3.x
  • PrettyTable โ€“ for formatting output tables in various styles (text, HTML)

๐Ÿ–ผ๏ธ Output Previews

Command Line Output

Formatted output in command line

HTML Output

Generated HTML table view

Text File Output

Saved output in a text file


๐Ÿš€ Getting Started

To run the project locally:

1. Clone the repository

```bash
git clone https://github.com/Anuja-jayasinghe/percolation_demonstration.git
cd percolation_demonstration
  1. Install required library
    pip install prettytable
  2. Run the application
python percolation_demo.py

About

This python program demostrate how percolation happens in a simple manner

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages