Posts by João Ferreira • 1 point
1 post
-
0
votes6
answers14517
viewsA: How to define the largest prime number within a given number?
Hello, I made a code to decrease the use of other libraries. Follows: def maior_primo(n): k = n while k > 1 and é_primo(k)==False: k = k - 1 return k def é_primo(k): primo = True div = 2 while…
pythonanswered João Ferreira 1