Computer Science, asked by chanchalh2015gmaicom, 4 months ago

. Write a Python program to input a number and print its value after adding 5 and after

reducing 5​

Answers

Answered by anindyaadhikari13
2

Required Answer:-

Question:

  • Write a Python program to input a number and print it's value after adding 5 and after reducing 5.

Solution:

Here comes the program.

n=int(input("Enter a number:  "))

print("After adding 5, number =",n+5)

print("After subtracting 5, number =",n-5)

Algorithm:

  1. START
  2. Accept the number.
  3. Add 5 to the number and display it.
  4. Subtract 5 from the number and display it.
  5. STOP

For verification, check out the attachment ☑.

Attachments:
Similar questions