Advertisement
Fhernd

bases-numericas.py

May 18th, 2018
2,954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. numero = 9876
  2.  
  3. print(bin(numero))
  4. print(oct(numero))
  5. print(hex(numero))
  6.  
  7. print('')
  8.  
  9. print(format(numero, 'b'))
  10. print(format(numero, 'o'))
  11. print(format(numero, 'x'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement