Python Problem ???
iam beginner at python ,...I cannot understand that problem and why you use the function
feq{} …..any help ,please
Code Challenge (Practice): Fill in the missing part of the FrequencyMap() function below so that it computes the frequency map of a given string Text and integer k.
def FrequencyMap(Text, k):
freq = {}
n = len(Text)
for i in range(n-k+1):
Pattern = Text[i:i+k]
freq[Pattern] = 0
return freq
• 608 views
•
link
0 answers
No answers yet.
Log in to answer this question.
So you want others to solve your challenge? I will close the post unless you have a concrete question.
freq is not a function, it's a dictionary.
https://docs.python.org/3/tutorial/datastructures.html#dictionaries
Hello esraa.g009!
We believe that this post does not fit the main topic of this site.
Out of scope for the forum
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
People helping OP are in reality enabling them, as the best way for them to learn is by doing this themselves. Please do not add answers or hints. I'll be deleting any such answers/hints. cc Fatima
Sorry about that. I thought OP was practicing some bioinformatics scripts.