hdarwin

cstutoringcenter.com_Hexadecimal Numbers

Jan 4th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. sum = 0
  2. for f in file("decimalsB.txt", "r"):
  3.     for x in str(hex(int(f.replace('\n', ''))))[2:]:
  4.         if 'd' in x:sum += 1
  5. print sum
Advertisement
Add Comment
Please, Sign In to add comment