hdarwin

cstutoringcenter.com_Random Dice Throws

Jan 4th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. sum = 0
  2. for x in open("dice.txt", "r"):
  3.     l = x.replace('\n', '').split(" ")
  4.     if l[0] == l[1]:
  5.         sum += 1
  6. print sum
Advertisement
Add Comment
Please, Sign In to add comment