You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
o código retorna uma lista ao invés de uma string exibindo o resultado de
cada laço por linha
ERRADO
def listaAleatoria(n):
s = [0] * n
for i in range(n):
s[i] = random.random()
return s
>>> listaAleatoria(8)
[0.12802238199002747, 0.2645255984028948, 0.9178583669551168, 0.2052996216547002
8, 0.55073244134492516, 0.20682733588527558, 0.64231697113958841, 0.730645729094
09908]
>>>
CERTO
def listaAleatoria(n):
s = [0] * n
for i in range(n):
s[i] = random.random()
print s[i]
>>> listaAleatoria(8)
0.15156642489
0.498048560109
0.810894847068
0.360371157682
0.275119183077
0.328578797631
0.759199803101
0.800367163582
Original issue reported on code.google.com by [email protected] on 5 Mar 2011 at 10:47
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 5 Mar 2011 at 10:47The text was updated successfully, but these errors were encountered: