Answered step by step
Verified Expert Solution
Question
1 Approved Answer
why am I getting these error messages? Python Online Compiler main.py 1 #Online Python compiler (interpreter) to run Python online. 2 # Write Python 3
why am I getting these error messages?
Python Online Compiler main.py 1 #Online Python compiler (interpreter) to run Python online. 2 # Write Python 3 code in this online editor and run it. 3- def BruteForce (Dna,k): 4 5. 6 7- 8- 9 10 11- 12 13 occurences - for 1 in range(len(Dna)-len(k)+1): loop over alignment match True 14 for j in range(len(k)): # loop over characters if Dna[i+1] 1- k[j]: # compare characters match False nismatch break if watch:# allchars matched occurrences.append(1) print(occurrences) 15 k input("Enter k-mers Motifs: ") 16 Dna input("Enter Ona sequence: ") 17 BruteForce (Dna, k) Run Shell Enter k-mers Motifs: AGAGA AGAGA Enter Dna sequence: AGATAGAGAGATAGAGAGATAGAGAGATAGAGAGATAGAG [4, 6, 12, 14, 20, 22, 28, 301 AGATAGAGAGATAGAGAGATAGAGAGATAGAGAGATAGAG Traceback (most recent call last): File " ", line 17, in File " ", line 12, in BruteForce NameError: name 'occurrences' is not defined >>>[4, 6, 12, 14, 20, 22, 28, 30] [4, 6, 12, 14, 20, 22, 28, 30) >>>
Step by Step Solution
★★★★★
3.45 Rating (158 Votes )
There are 3 Steps involved in it
Step: 1
In the 4th line you declared ocuurences But at the 12th ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started