Posts by Tom Phelps • 16 points
2 posts
-
0
votes6
answers6752
viewsA: Get the list of prime numbers smaller than N
To receive all prime numbers smaller than one 'n' is simple Follows the code from math import sqrt numero = int(input()) aux = 0 aux1 = 0 if numero > 3: print(2,'\n',3) #Coloquei isso aqui,…
pythonanswered Tom Phelps 16 -
0
votes2
answers1547
viewsA: Analyzing strings in a text file and returning the string that appeared most
It is simple :) But it is important that the words of both files are in separate lists! (one for each). That’s how you do it: palavras = {} for x in a: # a e b sao as listas contador = 1 for y in b:…