Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = input()
- b = input()
- f1 = open(a, 'r')
- f2 = open(b, 'r')
- r = []
- s = ''
- nsum = 0
- ksum = 0
- nk = 0
- kk = 0
- for i in f1:
- s = i
- for i in f2:
- x = int(i)
- nsum += x
- nk += 1
- if eval(s):
- ksum += x
- kk += 1
- f1.close()
- f2.close()
- f = open('secret.txt', 'w')
- f.write(str((kk / nk, ksum / nsum)))
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement