Numbers in Python

In Python there are two kind of numbers. One is integer and the other is float. We have in built methods in Python that can change an integer to float and change float to integer.

Read More Numbers in Python

What is happiness

A man went to Goutam Buddha and said, “I want happiness”. Buddha said, “First remove ‘I’, that is Ego. Then Remove ‘want’, that is ‘Desire’ and see what you have – happiness.

Read More What is happiness

Class and Object in Python

How we can create different objects in python. #!/usr/bin/python3 class Egg: def __init__(self, kind = ‘fired’): self.kind = kind def whatkind(self): return self.kind def main(): fried = Egg() print(fried.whatkind()) scrambled = Egg(‘scrambled’) print(scrambled.whatkind()) if __name__ == “__main__”: main()

Read More Class and Object in Python