fork download
  1. import random
  2.  
  3. posicao = [40.51, 30.52, 30.31]
  4. coordenadas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]
  5.  
  6. for indice in range(0, len(posicao)):
  7. if posicao[indice]>40:
  8. for indice2 in range(indice*4, indice*4+4):
  9. coordenadas[indice2] = random.randrange(0,200)
  10.  
  11.  
  12. print(coordenadas)
Success #stdin #stdout 0.02s 37616KB
stdin
Standard input is empty
stdout
[122, 41, 144, 17, 50, 60, 70, 80, 90, 100, 110, 120]