Advertisement
calfred2808

#Python Get Covid-19 Info

Jul 19th, 2020
1,170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. # importing the library
  2. from covid import Covid
  3. # initializing
  4. covid = Covid()
  5. # printing data for the world
  6.  
  7. print("Total active cases in world:", covid.get_total_active_cases())
  8. print("Total recovered cases in world:", covid.get_total_recovered())
  9. print("Total deaths in world:", covid.get_total_deaths())
  10.  
  11.  
  12. UserCountry = input("Enter your Country: "+ "\n")
  13. # getting data according to country name
  14. # data will be stored as a dictionary
  15. cases = covid.get_status_by_country_name(UserCountry)
  16. # printing country's data using for loop
  17. for x in cases:
  18.     print(x, ":", cases[x])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement