lolamontes69

Python / Base_x converter.

Jun 2nd, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def base_x_converter(numb, x):
  2.     print int(numb, x)
  3.  
  4. numb = str(raw_input('Enter number >'))
  5. x = int(raw_input('Enter base that number is in >'))
  6.  
  7. base_x_converter(numb, x)
Advertisement
Add Comment
Please, Sign In to add comment