Posts by Nayara Souza • 29 points
3 posts
-
-1
votes3
answers144
viewsQ: Check magic numbers (those whose square root is a prime number) within a range
I wonder why it doesn’t work. import math #Se a divisão do numero der um primo, o número é mágico is_magic = [] for n in range(8, 27): cont = 0 if pow(n,(1/2)) == 2 or 3 or 5 or 7: cont += 1…
pythonasked Nayara Souza 29 -
-5
votes2
answers161
viewsQ: Complete the URL
Create a function called domain that will receive a String br.NOMEDOSITE.com and its function will be to return "http://br.NOMEDOSITE.com". I did so: function dominio ("br.NOMEDOSITE.com" ){…
-
-1
votes4
answers140
viewsQ: Exercise: Quick replacement
Your mission now is to create a function called substituicaoRapida that you receive a text, a word to look for and the word that will replace the one you are looking for. The function should return…