Skip to main content

Posts

Showing posts with the label Covid-19

Python program to make simple calculator

Python program to make simple calculator In this example you will learn to create a simple calculator that can add,subtract,multiply or divide depending upon the input from the user. Example: simple calculator by using functions. def   add ( num1 , num2 ):    return  num1+num2   def   subtract  ( num1 , num2 ):    return  num1-num2   def   multiply  ( num1 , num2 ):    return  num1*num2   def   divide  ( num1 , num2 ):    return  num1/num2   print ( "please enter your choice :\n" \          "2.subtract\n" \        "3.multiply\n" \        "4.divide\n" )   ch=int( input ( "please enter your choice :" )) num1 = int( input ( "Enter the first number:" ))   if  ch== 1 :    print (num1+num2) elif ...

Python - How To Merge Two Dictionaries

  Python -  How to merge two dictionaries As we know If you are working as Python developer, data analytics or data scientists for any organisation then it is very important for you to know how to merge two dictionaries. There are various ways in which Dictionaries can be merged by the use of various functions and constructors in Python. In this article, we will discuss a few ways of merging dictionaries.  Using the method update () By using the method update() in Python, one list can be merged into another. But in this, the second list is merged into the first list and no new list is created. It returns  None .    Example # Python code to merge dict using update() method def Merge(dict1, dict2):      return (dict2.update(dict1))        # Driver code dict1 = { 'a' : 20 , 'b' : 8 } dict2 = { 'd' : 6 , 'c' : 4 }   # This return None print (Merge(dict1, dict2))   # changes made in dict2 pri...

URL - Uniform Resource Locator

What is URL? A Uniform Resource Locator (URL), colloquially termed a web address,is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it.  A URL is a specific type of Uniform Resource Identifier (URI) WEBSITE https://url.spec.whatwg.org HTTP uses Internet address in a special format called a Uniform Resource Locator Or URL. URLs look like this: type://address/path The other example of URLs are: ftp://ftp.prenhall.com,http://www.yahoo.com,news://alt.tennis ,www.Instagram.com,www.Facebook.com ,www.blogger.com etc. A URL is also referred to as Web Address Sometimes. Element of a URL A URL(Uniform Resource Locator) is an address of a file on Internet . Let us discuss the components or syntax elements of URLs. A file's Internet address , or URL, is determined by the following: The type of server or protocol The name/address of the server on the Internet The location of the file on the server ( this location may be related as ...

Central Board Of Secondary Education (CBSE)

CBSE may decide on Board exams CBSE is deliberating on options, including granting of marks based on the average score of papers in which the candidate has already appeared; making it optional for students to appear in the exams and evaluating them on the basis of internal assessment; or rescheduling the papers for September-October . NEW DELHI : There is a likelihood of CBSE cancelling the pending board examinations, scheduled to be held from July 1, in view of the rising number of Covid-19 infections across India. CBSE is deliberating on options, including granting of marks based on the average score of papers in which the candidate has already appeared; making it optional for students to appear in the exams and evaluating them on the basis of internal assessment; or rescheduling the papers for September-October. There has been growing pressure from parents and state governments like Maharashtra and New Delhi on CBSE to cancel the exams. Hearing a petition from some paren...