Advertisement
estefani-adriano

Successor and Predecessor! PYTHON

Oct 13th, 2023 (edited)
1,115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | Software | 0 0
  1. #Successor and Predecessor!
  2.  
  3. n1 = int (input ('Enter a number: '))
  4. ant = n1 - 1
  5. suc = n1 + 1
  6.  
  7. print ('The {}SUCCESSOR{} of {} is {}!' .format('\033[4;35m', '\033[m',n1, suc))
  8. print ('The {}PREDECESSOR{} of {} is {}!' .format('\033[4;34m', '\033[m',n1, ant))
  9.  
  10. #by Estéfani =D
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement