0% found this document useful (0 votes)
3 views1 page

Python Program for Arithmetic Operators

The document provides a Python program that implements basic arithmetic operators. It prompts the user to input two numbers and then performs addition, subtraction, multiplication, division, floor division, modulus, and exponentiation on those numbers. The output demonstrates the results of these operations using example inputs.

Uploaded by

valiswaran1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Program for Arithmetic Operators

The document provides a Python program that implements basic arithmetic operators. It prompts the user to input two numbers and then performs addition, subtraction, multiplication, division, floor division, modulus, and exponentiation on those numbers. The output demonstrates the results of these operations using example inputs.

Uploaded by

valiswaran1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

WRITE A PYTHON PROGRAM TO IMPLEMENT ARITHMETIC

OPERATORS

PRINT(“ARITHMETIC OPERATORS”)
PRINT(“**************************”)
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))

print("Addition:", a + b)
print("Subtraction:", a - b)
print("Multiplication:", a * b)
print("Division:", a / b)
print("Floor Division:", a // b)
print("Modulus:", a % b)
print("Exponentiation:", a ** b)

OUTPUT:
Enter the first number: 20
Enter the second number: 20
Addition: 40
Subtraction: 0
Multiplication: 400
Division: 1.0
Floor Division: 1
Modulus: 0
Exponentiation: 104857600000000000000000000

You might also like