fork download
  1. from random import choice
  2.  
  3. def escolher():
  4.  
  5. a = choice([[10.00,90.00,30.00,40.00],[50.00,60.00,90.00,80.00]])
  6.  
  7. fitness_1_temp = 0
  8.  
  9. for i in a:
  10. fitness_1_temp = (fitness_1_temp+i) if i <= 85.0 else (fitness_1_temp-i)
  11.  
  12. return fitness_1_temp
  13.  
  14. print (escolher())
Success #stdin #stdout 0.02s 36952KB
stdin
Standard input is empty
stdout
-10.0