Skip to main content

Know the current Covid status of your country using Python!

 We all are aware about COVID-19, i.e. coronavirus infectious disease 2019. 

covid19,use python to know the status of covid of your country, python, python programming, covid,coronavirus

Isn't it fascinating, using python for numerous purpose!

So, here is the python program that can help you know the status of COVID-19 of your country.

--------------------------------------------------------------------------------------------------------------------------

For this you need to install one package using the pip command.

pip install covid

--------------------------------------------------------------------------------------------------------------------------

from covid import Covid

covid=Covid()

cases=covid.get_status_by_country_name("India") #enter the name of the country you want to know the status

for x in cases:

    print(x,":",cases[x])

--------------------------------------------------------------------------------------------------------------------------

Output of the above program, giving current status is:

id : 80

country : India

confirmed : 9857029

active : 356546

deaths : 143019

recovered : 9357464

latitude : 20.593684

longitude : 78.96288

last_update : 1607920004000

-------------------------------------------------------------------------------------------------------------------------

I hope this article have helped you! Stay tuned for more such posts.

For suggestions or queries kindly mail ssamruddhi.k2015@gmail.com or comment below.


Comments

Popular posts from this blog

What is turtle.stamp() in python?

turtle.stamp() turtle.stamp() is used to stamp a copy of the turtle shape, it prints the shape at that point and moves forward with the instructions. Here shape of the turtle does not matter. It does the same for every turtle shape.  Example:  Here is the example of stamp() used: import   turtle def   tri ():      for   i   in   range ( 10 ):          turtle . degrees ( 60 )          turtle . forward ( 200 + 10 * i )          turtle . stamp ()          turtle . right ( 200 ) turtle . speed ( 7 ) turtle . color ( "orange" )         tri () turtle . done () For more such posts, stay tuned!

Introduction to Artificial Intelligence

WHAT  IS  ARTIFICIAL  INTELLIGENCE? Artificial Intelligence                  Concept of AI goes back to the classical ages. Under greek   mythology , the concept of machines and mechanical men were well thought off. In 1950, “ALAS TURING”, published landmark paper “Computing Machinery and Intelligence”, proposes “Imitation Game”, known as the famous “TURING TEST” He speculated about the possibility of creating machines that think. Unfortunately, until this date we haven’t found a machine that has fully cleared the Turin Test. Followed by this was the era of 1951, in which MARVIN MINSKY and DEAN EDMUNDS built the first   artificial neural network using 3000 vacuum tubes stimulating 40 neurons. Next in 1952,   ARTHUR SAMUEL, wrote the first machine learning program(Game AI) for checkers. In 1956, there was the birth of AI. JOHN Mc CARTHY, first coined the term “AI” at the Dartmouth Conference. Coming to 1959, first AI laboratory, where   the research on AI has begu

Use Python to know about Artificial Intelligence

 Hey, welcome back!   You'll be happy to know that you can use python to know about any topic related to your research from wikipedia. Let's check the code.     #import module import requests import pandas as pd from bs4 import BeautifulSoup def getdata(url):     r=requests.get(url)     return r.text htmldata=getdata("https://en.wikipedia.org/wiki/Artificial_Intelligence") soup= BeautifulSoup(htmldata, 'html.parser') data='' for data in soup.find_all("p"):     print(data.get_text()) Here is the output of the code. You can use the same code for acquiring various kind of information just by doing a slight change.  htmldata=getdata("https://en.wikipedia.org/wiki/(#Entering the topic name") Assume, you want to know about solar eclipse, here is the code for it. Observe the slight change in it. #import module import requests import pandas as pd from bs4 import BeautifulSoup def getdata(url):     r=requests.get(url)     return r.text htmld