This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# counting point mutations | |
# count all mutations where C != C, G !=G, A != A, and T != T | |
import algorithm | |
# define string variables | |
var s: string = "GAGCCTACTAACGGGAT" | |
var t: string = "CATCGTAATGACGGCCT" | |
# define count variable for number of mutations | |
var mutations: int = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data: string = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC" | |
var | |
A: int = 0 | |
C: int = 0 | |
G: int = 0 | |
T: int = 0 | |
for letter in data: | |
if letter == 'A': |