forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoronacases.py
97 lines (81 loc) · 4.65 KB
/
coronacases.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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 indiac():
cases = f"""
██╗███╗░░██╗██████╗░██╗░█████╗░
██║████╗░██║██╔══██╗██║██╔══██╗
██║██╔██╗██║██║░░██║██║███████║
██║██║╚████║██║░░██║██║██╔══██║
██║██║░╚███║██████╔╝██║██║░░██║
╚═╝╚═╝░░╚══╝╚═════╝░╚═╝╚═╝░░╚═╝
Country Name :- {name}
New Confirmed Cases :- {indiaconfirmed}
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":
indiac()
sleep(1)
choices()
else:
print("\nYou Have Entered Something Wrong, Please Enter Again")
choices()
choices()