Posts by Frederico • 99 points
5 posts
-
2
votes2
answers478
viewsQ: Arithmetic mean in Javascript
I’m having trouble calculating the arithmetic average of two notes in my Javascript program. When I put 10 on Nota1 and 10 on nota2, I follow to make the media, but unfortunately the final result of…
javascriptasked Frederico 99 -
0
votes4
answers169
viewsQ: Python - Return all cities of a.txt file in a percentage range
I’m having trouble returning all cities with the percentage within a range that the user has gone through. My text file consists of these cities and their respective isolation rates: São Paulo = 30…
-
2
votes3
answers745
viewsQ: Return the positions of the largest number in a matrix
I need a code that returns the position of the largest element of the matrix, and if this element repeats, the code returns all positions that this largest element appears. Below, in my code, I can…
-
3
votes1
answer183
viewsQ: Python recursive method that returns how many times a given element appears in a vector
I want to make a recursive method in Python that returns how many times an element appears in an array. Below follows my code using binary search: def binaryrec(valor, itens, menor, maior): vezes =…
-
-3
votes1
answer164
viewsQ: Python Recursiveness - Rest of the division of two numbers
I’m having trouble solving a problem in Python using recursive form: Make a recursive function that gets the rest of the split between two positive integers. Example: rest(33,5) = 3 Can you please…