Historical News Fun Facts Python Script

This Python script provides an interactive and engaging way to learn about major historical news events. Users can choose from a variety of categories and receive a random, interesting fact from each, making history both fun and informative.

Click to view script…
#!/usr/bin/env python3
import random

def main():
    categories = {
        "1": {
            "name": "Wars & Conflicts",
            "facts": [
                "World War II (1939-1945) saw the largest mobilization of military forces in history.",
                "The American Civil War (1861-1865) led to the abolition of slavery in the United States.",
                "World War I (1914-1918) introduced modern warfare techniques like tanks and chemical warfare.",
                "The Vietnam War sparked significant anti-war protests and shaped global politics for decades.",
                "The Korean War (1950-1953) ended in an armistice, leaving the Korean Peninsula divided.",
                "The Gulf War (1990-1991) was one of the first conflicts broadcast live on television.",
                "The Napoleonic Wars reshaped Europe in the early 19th century.",
                "The Crimean War (1853-1856) saw the first use of the telegraph for military communication.",
                "The Thirty Years' War (1618-1648) was one of the longest and most destructive conflicts in Europe.",
                "The Falklands War (1982) highlighted the lingering effects of colonial disputes."
            ]
        },
        "2": {
            "name": "Political Milestones",
            "facts": [
                "The fall of the Berlin Wall in 1989 symbolized the end of the Cold War.",
                "Nelson Mandela's release in 1990 marked a significant step toward ending apartheid in South Africa.",
                "The Declaration of Independence in 1776 laid the foundation for the United States.",
                "The French Revolution (1789-1799) radically transformed France’s political and social structure.",
                "India gained independence from British colonial rule in 1947.",
                "The establishment of the United Nations in 1945 aimed to promote peace and cooperation globally.",
                "The suffragette movement secured voting rights for women in many countries during the early 20th century.",
                "The end of the Cold War in 1991 reshaped global political alliances.",
                "The formation of the European Union helped unify post-war Europe.",
                "The Arab Spring in the early 2010s spurred political change across several Middle Eastern countries."
            ]
        },
        "3": {
            "name": "Tech & Science Breakthroughs",
            "facts": [
                "The Apollo 11 moon landing in 1969 was watched live by millions around the globe.",
                "The invention of the internet revolutionized communication and information sharing.",
                "The Human Genome Project, completed in 2003, mapped the entire human genetic code.",
                "The launch of the Hubble Space Telescope in 1990 expanded our view of the universe.",
                "The discovery of penicillin in 1928 marked the beginning of modern antibiotics.",
                "The advent of smartphones has transformed everyday communication and connectivity.",
                "ENIAC, one of the first computers built in 1945, paved the way for the computer age.",
                "Quantum computing promises to tackle problems beyond the capabilities of classical computers.",
                "The discovery of the Higgs boson in 2012 confirmed the mechanism that gives particles mass.",
                "CRISPR technology is revolutionizing genetics through precise gene editing."
            ]
        },
        "4": {
            "name": "Natural Disasters",
            "facts": [
                "The 2004 Indian Ocean tsunami is one of the deadliest natural disasters in modern history.",
                "The eruption of Mount Vesuvius in AD 79 famously buried the Roman cities of Pompeii and Herculaneum.",
                "The 1906 San Francisco earthquake led to massive destruction and a major rebuild of the city.",
                "Hurricane Katrina in 2005 devastated the Gulf Coast region of the United States.",
                "The Great Galveston Hurricane of 1900 remains the deadliest natural disaster in U.S. history.",
                "The 2011 Tōhoku earthquake and tsunami in Japan triggered a nuclear crisis at Fukushima.",
                "The Dust Bowl of the 1930s severely impacted agriculture and displaced thousands in the American Midwest.",
                "The 1980 eruption of Mount St. Helens was one of the most significant volcanic events in U.S. history.",
                "The Lisbon earthquake of 1755 had far-reaching effects on European philosophy and society.",
                "The Bhola cyclone of 1970 was one of the most catastrophic tropical cyclones ever recorded."
            ]
        },
        "5": {
            "name": "Cultural & Entertainment Events",
            "facts": [
                "The Beatles’ appearance on The Ed Sullivan Show in 1964 kick-started Beatlemania in the U.S.",
                "Woodstock in 1969 became an iconic symbol of the counterculture movement.",
                "The launch of MTV in 1981 revolutionized the music industry and pop culture.",
                "Blockbuster movies emerged in the 1970s, forever changing the film industry.",
                "The first Academy Awards in 1929 established a global benchmark for cinematic achievement.",
                "Reality TV's rise in the early 2000s reshaped modern television programming.",
                "The global popularity of video games has transformed entertainment and technology industries.",
                "Social media platforms in the 21st century have redefined celebrity culture and public interaction.",
                "Streaming services have dramatically changed how audiences consume films and television shows.",
                "Internet memes have become a defining aspect of digital culture in recent years."
            ]
        }
    }
    
    while True:
        print("\n=== Fun Fact Utility: Biggest News Events in History ===")
        print("Choose a category for a fun fact:")
        for key, value in categories.items():
            print(f"{key}. {value['name']}")
        print("Q. Quit")
        
        choice = input("Enter your choice: ").strip().lower()
        if choice == 'q':
            print("Goodbye!")
            break
        elif choice in categories:
            fact = random.choice(categories[choice]["facts"])
            print(f"\nFun Fact from {categories[choice]['name']}:")
            print(fact)
        else:
            print("Invalid choice. Please select a valid category.")

if __name__ == "__main__":
    main()