Skip to main content

Posts

Showing posts with the label Write a Python program to enter two numbers and perform all arithmetic operations.

ads1

Python basis, 2. Write a Python program to enter two numbers and perform all arithmetic operations.

  2. Write a Python program to enter two numbers and perform all arithmetic operations. Solution :- no1 = float(input("Enter the First number :-")) no2 = float(input("Enter the Second number :-")) add = no1 + no2 sub = no1 - no2 mul = no1 * no2 div = no1 / no2 mod = no1 % no2 exp = no1 ** no2 print("The Sum of two number is :- ",add) print("The Sub of two number is :-",sub) print("The mul of two number is :-",mul) print("The div of two number is :-",div) print("The mod of two number is :-",mod) print("The Exp of two number is :-",exp)   Output :-

ads2