AE
Size: a a a
AE
AE
R3
AE
R3
AE
R3
R3
R3
R3
VA
VA
import requests
API_URL = "https://coronavirus-api.net/get_all?country={country}"
def get_list_for_country(country):
resp = requests.get(API_URL.format(country=country))
return resp.json()
def print_info(confirmed, deaths, recovered):
print("Подтверждённых больных", confirmed)
print("Смертей", deaths)
print("Подтверждённых выздоровлений", recovered)
if __name__ == '__main__':
list_of_actions = get_list_for_country("Russia")
last_action = list_of_actions[-1]
confirmed = last_action['Confirmed']
deaths = last_action['Deaths']
recovered = last_action['Recovered']
print_info(confirmed, deaths, recovered)
B
B
B
import requests
API_URL = "https://coronavirus-api.net/get_all?country={country}"
def get_list_for_country(country):
resp = requests.get(API_URL.format(country=country))
return resp.json()
def print_info(confirmed, deaths, recovered):
print("Подтверждённых больных", confirmed)
print("Смертей", deaths)
print("Подтверждённых выздоровлений", recovered)
if __name__ == '__main__':
list_of_actions = get_list_for_country("Russia")
last_action = list_of_actions[-1]
confirmed = last_action['Confirmed']
deaths = last_action['Deaths']
recovered = last_action['Recovered']
print_info(confirmed, deaths, recovered)
VA
B
B