Skip to content

Commit

Permalink
sort: Depreciated program.
Browse files Browse the repository at this point in the history
API service discontinued.
  • Loading branch information
NitkarshChourasia committed Dec 29, 2023
1 parent b7c81a2 commit d1a3c13
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions depreciated_programs/corona_cases.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import sys

try:
import requests
except ImportError:
print("Please Install Requests Module With Command 'pip install requests'")
sys.exit(1)
from time import sleep

url = "https://api.covid19api.com/summary"
visit = requests.get(url).json()

NewConfirmed = visit["Global"]["NewConfirmed"]
TotalConfirmed = visit["Global"]["TotalConfirmed"]
NewDeaths = visit["Global"]["NewDeaths"]
TotalDeaths = visit["Global"]["TotalDeaths"]
NewRecovered = visit["Global"]["NewRecovered"]
TotalRecovered = visit["Global"]["TotalRecovered"]

india = visit["Countries"]
name = india[76]["Country"]
indiaconfirmed = india[76]["NewConfirmed"]
indiatotal = india[76]["TotalConfirmed"]
indiaDeaths = india[76]["NewDeaths"]
deathstotal = india[76]["TotalDeaths"]
indianewr = india[76]["NewRecovered"]
totalre = india[76]["TotalRecovered"]
DateUpdate = india[76]["Date"]


def world():
world = f"""
▀▀█▀▀ █▀▀█ ▀▀█▀▀ █▀▀█ █░░   ▒█▀▀█ █▀▀█ █▀▀ █▀▀ █▀▀   ▀█▀ █▀▀▄   ▒█░░▒█ █▀▀█ █▀▀█ █░░ █▀▀▄
░▒█░░ █░░█ ░░█░░ █▄▄█ █░░   ▒█░░░ █▄▄█ ▀▀█ █▀▀ ▀▀█   ▒█░ █░░█   ▒█▒█▒█ █░░█ █▄▄▀ █░░ █░░█
░▒█░░ ▀▀▀▀ ░░▀░░ ▀░░▀ ▀▀▀   ▒█▄▄█ ▀░░▀ ▀▀▀ ▀▀▀ ▀▀▀   ▄█▄ ▀░░▀   ▒█▄▀▄█ ▀▀▀▀ ▀░▀▀ ▀▀▀ ▀▀▀░\n
New Confirmed Cases :- {NewConfirmed}
Total Confirmed Cases :- {TotalConfirmed}
New Deaths :- {NewDeaths}
Total Deaths :- {TotalDeaths}
New Recovered :- {NewRecovered}
Total Recovered :- {TotalRecovered}
"""
print(world)


def india():
cases = f"""
██╗███╗░░██╗██████╗░██╗░█████╗░
██║████╗░██║██╔══██╗██║██╔══██╗
██║██╔██╗██║██║░░██║██║███████║
██║██║╚████║██║░░██║██║██╔══██║
██║██║░╚███║██████╔╝██║██║░░██║
╚═╝╚═╝░░╚══╝╚═════╝░╚═╝╚═╝░░╚═╝
Country Name :- {name}
New Confirmed Cases :- {indiaonfirmed}
Total Confirmed Cases :- {indiatotal}
New Deaths :- {indiaDeaths}
Total Deaths :- {deathstotal}
New Recovered :- {indianewr}
Total Recovered :- {totalre}
Information Till :- {DateUpdate}
"""
print(cases)


print(
"""
░█████╗░░█████╗░██████╗░░█████╗░███╗░░██╗░█████╗░  ██╗░░░██╗██╗██████╗░██╗░░░██╗░██████╗
██╔══██╗██╔══██╗██╔══██╗██╔══██╗████╗░██║██╔══██╗  ██║░░░██║██║██╔══██╗██║░░░██║██╔════╝
██║░░╚═╝██║░░██║██████╔╝██║░░██║██╔██╗██║███████║  ╚██╗░██╔╝██║██████╔╝██║░░░██║╚█████╗░
██║░░██╗██║░░██║██╔══██╗██║░░██║██║╚████║██╔══██║  ░╚████╔╝░██║██╔══██╗██║░░░██║░╚═══██╗
╚█████╔╝╚█████╔╝██║░░██║╚█████╔╝██║░╚███║██║░░██║  ░░╚██╔╝░░██║██║░░██║╚██████╔╝██████╔╝
░╚════╝░░╚════╝░╚═╝░░╚═╝░╚════╝░╚═╝░░╚══╝╚═╝░░╚═╝  ░░░╚═╝░░░╚═╝╚═╝░░╚═╝░╚═════╝░╚═════╝░"""
)
print("\nDeveloped By @TheDarkW3b")


def choices():
print("\n1 - To Know Corona Virus Update Across World")
print("\n2 - To Know Corona Virus Update In India")
choice = input("Enter 1 Or 2 :- ")

if choice == "1":
world()
sleep(1)
choices()
elif choice == "2":
india()
sleep(1)
choices()
else:
print("\nYou Have Entered Something Wrong, Please Enter Again")
choices()


choices()

0 comments on commit d1a3c13

Please sign in to comment.