Skip to content

Instantly share code, notes, and snippets.

@acwoss
Created February 24, 2017 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acwoss/919679608e0f5da804f48d99a46e0d0c to your computer and use it in GitHub Desktop.
Save acwoss/919679608e0f5da804f48d99a46e0d0c to your computer and use it in GitHub Desktop.
# http://pt.stackoverflow.com/questions/186428
from random import choice
def escolher():
a = choice([[10.00,90.00,30.00,40.00],[50.00,60.00,90.00,80.00]])
fitness_1_temp = 0
for i in a:
fitness_1_temp = (fitness_1_temp+i) if i <= 85.0 else (fitness_1_temp-i)
return fitness_1_temp
print (escolher())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment