A simple Python program that simulates disaster alerts. Users can generate alerts for different disaster types, view saved alerts, and save new alerts to a file.
- Generate disaster alerts for events like floods, landslides, cyclones, fires, and earthquakes.
- Save alerts to a
saved_alerts.txt
file. - View previously saved alerts.
- The program displays a menu with options to:
- Generate a disaster alert.
- View saved alerts.
- Exit the program.
- Users provide input for the disaster location and type.
- The program validates input and generates an alert message.
- Users can choose to save the alert or discard it.
- Clone the repository:
git clone https://github.com/ameenslm/Disaster-Alert-Simulator.git
- Navigate to the project directory:
cd Disaster-Alert-Simulator
- Run the program:
python main.py
- main.py: The main script containing the program logic.
- saved_alerts.txt: File where saved alerts are stored (created automatically).
==========================
- Generate Disaster Alert
- View Saved Alerts
- Exit
Enter your choice (1, 2, or 3): 1
Enter the location of the disaster: Springfield
Enter the disaster type (Flood, Landslide, Cyclone, Fire, Earthquake): flood
🚨 ALERT! A Flood has occurred in Springfield. Stay safe and follow emergency protocols!
Would you like to save this alert? (yes/no): yes
Alert saved. Stay safe and wait for government protocols.
Feel free to fork this repository and contribute to its development. Pull requests are welcome!