Guest User

Untitled

a guest
Oct 18th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. A=0
  2. G=0
  3. T=0
  4. C=0
  5. with open('/Users/rebka/PycharmProjects/Project2/mutant_dna.txt') as dna_file:
  6.  
  7. for symbol in dna_file.read():
  8. print(symbol)
  9. if symbol == 'A':
  10. A+=1
  11. elif symbol == 'G':
  12. G+=1
  13. elif symbol == 'T':
  14. T+=1
  15. elif symbol == 'C':
  16. C+=1
  17. print (f"There are {A} A's in this number.")
  18. print (f"There are {G} G's in this number.")
  19. print (f"there are {T} T's in this number.")
  20. print (f"there are {C} C's in this number.")
Add Comment
Please, Sign In to add comment