Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. isotopes = [79, 81]
  2. abundances = [50.69, 49.31]
  3.  
  4. weighted = map(lambda x, y: x * y, isotopes, abundances)
  5. # multiply isotope mass and abundance
  6.  
  7. weighted = sum(weighted)/100
  8. # sum them up and divide by 100
  9.  
  10. print weighted
  11. >>>> 79.9862
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement