Programming

Object-Oriented-Python

Mathematical Operations in Python using Object-Oriented Programming in Python

Python is an object-oriented language and a class can have properties and methods. In this post, I will create a simple class having a constructor __init__() and four methods namely mysum(), mymul(), mydiv() and mysub(). Moreover, they compute addition of two numbers, multiplication of two numbers, division of a number by another and subtraction  of

Mathematical Operations in Python using Object-Oriented Programming in Python Read More »

Different Ways to Create a Dictionary in Python

Dictionary in Python is a very important data-structure which can have unordered list of key value pairs. See a dictionary d={2:4, 3:9, 4:16, ‘India’:’Delhi’} In dictionary d, you can key:value pairs this is one of the ways to create a dictionary. However, there are several ways to create a dictionary using dict() function. In this

Different Ways to Create a Dictionary in Python Read More »

©Postnetwork-All rights reserved.