Created
April 18, 2020 05:16
-
-
Save blogcacanid/3a9662883e658beaf221a4a2a775fb46 to your computer and use it in GitHub Desktop.
covid19.py Sistem Informasi Covid-19 Python Total Dunia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def total_dunia(): | |
| print('*** TOTAL COVID-19 DUNIA') | |
| print('----------------------------------------') | |
| url = "https://api.kawalcorona.com/positif/" | |
| data = requests.get(url).text | |
| confirmed = json.loads(data) | |
| print(f'Confirmed : {confirmed["value"]}') | |
| url = "https://api.kawalcorona.com/sembuh/" | |
| data = requests.get(url).text | |
| recovered = json.loads(data) | |
| print(f'Recovered : {recovered["value"]}') | |
| url = "https://api.kawalcorona.com/meninggal/" | |
| data = requests.get(url).text | |
| deaths = json.loads(data) | |
| print(f'Deaths : {deaths["value"]}') | |
| print('----------------------------------------') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment