Posts by Yasmin Teixeira • 47 points
5 posts
-
-1
votes2
answers61
viewsQ: Loop while not working well - Hakerrank
I’m trying to solve the Hackerrank repeated string problem, where we should build a function that counts the number of letters a repeat in a string bounded by an n number. The function entries are n…
python-3.xasked Yasmin Teixeira 47 -
-2
votes1
answer66
viewsQ: Fix infinite loop
Hello, I made a code for a function that loops infinity every time I call but I can’t figure out why. Follows the code: def geraprimos(qtd, inicio, fim): lista = [] while len(lista) < qtd: numero…
pythonasked Yasmin Teixeira 47 -
0
votes2
answers87
viewsQ: I do not understand the error None in this function
I cannot understand why in the end this function does not return a string. The error is in fptr.write(result + '\n'), as if the function returns an object of type None. def dnaComplement(s):…
-
1
votes1
answer45
viewsQ: I couldn’t quite understand how this code works
I saw this code to transpose the matrix but I couldn’t quite understand how it works. For me this row[i] looks more like a "marker" of an index, for example, line 1, line 2, line 3 and line 4. I…
pythonasked Yasmin Teixeira 47 -
1
votes1
answer73
viewsQ: I can’t get the None result out of this code
I’m trying to pull this one out None, I’ve already put else, I’ve already put add2 and then I defined add = add2 but I haven’t been able to get it out. How does it look: Which fruit do you want to…