Python Programming Examples 01. Program to demonstrate different number data types in Python Python Code ''' Program to demonstrate different number data types ''' # Integers x = 5 print("x = ", x) print("The type of x", type(x)) # Floating-Point Numbers y = 40.5 print("y = ", y) print("The type of y", type(y)) # Complex Numbers z = 1+5j print("z = ", z) print("The type of z", type(z)) Copy Output x = 5 The type of x <class 'int'> y = 40.5 The type of y <class 'float'> z = (1+5j) The type of z <class 'complex'> 02. Program to perform different Arithmentic Operations on numbers Python Code ''' Program to perform different Arithmentic Operations ''' # Taking Input x = float(input("Enter First Number : ...
Posts
Showing posts from February, 2025