Python program using Assignment Operator - 👑 सार्थक मुंड S3 🤴🏻

Python program using Assignment Operator

banner

Write a program (WAP) in PYTHON to read two numbers from keyboard(User Input) and perform addition, subtraction, multiplication and division using assignment operator.

num1 = int(input('Enter First number: '))
num2 = int(input('Enter Second number '))

sum = num1 + num2
sub = num1 - num2
mul = num1 * num2
div = num1 / num2
floor_div = num1 // num2

print('Addition of ', num1, 'and', num2, 'is :', sum)
print('Subtraction of ', num1, 'and', num2, 'is :', sub)
print('Multiplication of ', num1, 'and', num2, 'is :', mul)
print('Division of ', num1, 'and', num2, 'is :', div)
print('Floor Division of ', num1, 'and', num2, 'is :', floor_div)
Try it Yourself ➠

output of above program

Must Read :-
  1. Blogger Tutorial
  2. C Programs
  3. C++ Programs
  4. Java Programs
  5. Python Programs
  6. Programming Notes 
  7. Questions & Answers
  8. My Codes : HTML, CSS & JS
  9. All Subject Notes
Previous article
Next article

1 Comments

Articles Ads

Articles Ads 1

Articles Ads 2

Advertisement Ads