Created
February 24, 2017 11:55
-
-
Save acwoss/919679608e0f5da804f48d99a46e0d0c to your computer and use it in GitHub Desktop.
SOpt - Python - http://pt.stackoverflow.com/questions/186428
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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