def percentBases(dnaStrand):
cytosine = dnaStrand.count('C')
guanine= dnaStrand.count('G')
adenine= dnaStrand.count('A')
thymine= dnaStrand.count('T')
percentC = round(cytosine/len(dnaStrand)*100,2)
percentG = round(guanine/len(dnaStrand)*100,2)
percentA = round(adenine/len(dnaStrand)*100,2)
percentT = round(thymine/len(dnaStrand)*100,2)
return(percentC, percentG, percentA, percentT)
I have written this simple code and have been asked to record an approximate time complexity using big-O notation. I don't have a clue about big-O notation but after reading I would have a guess at: T(n) = 8 O(8)
Please correct me if I'm wrong and try to explain to me. Thanks