Created
April 18, 2020 05:14
-
-
Save blogcacanid/8622a7e754291d4297cfeda297e2a2c5 to your computer and use it in GitHub Desktop.
covid19.py Sistem Informasi Covid-19 Python Total Indonesia
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_indonesia(): | |
url = "https://api.kawalcorona.com/indonesia/" | |
data = requests.get(url).text | |
obj = json.loads(data) | |
#print(data) | |
for summary in obj: | |
print('*** TOTAL COVID-19 INDONESIA') | |
print('----------------------------------------') | |
print(f'Positif : {summary["positif"]}') | |
print(f'Sembuh : {summary["sembuh"]}') | |
print(f'Meninggal : {summary["meninggal"]}') | |
print('----------------------------------------') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment