Difference between revisions of "Testing"
(→Mono) |
|||
Line 10: | Line 10: | ||
− | === | + | ===Code with syntaxhighlight=== |
− | |||
<syntaxhighlight lang="Python" line='line'> | <syntaxhighlight lang="Python" line='line'> | ||
# code - http://rosettacode.org/wiki/Evolutionary_algorithm | # code - http://rosettacode.org/wiki/Evolutionary_algorithm | ||
Line 18: | Line 17: | ||
from random import choice, random | from random import choice, random | ||
− | target = list("METHINKS IT IS LIKE A WEASEL") | + | target = list("METHINKS IT IS LIKE A WEASEL") |
− | charset = letters + ' ' | + | charset = letters + ' ' |
− | parent = [choice(charset) for _ in range(len(target))] | + | parent = [choice(charset) for _ in range(len(target))] |
− | minmutaterate = .09 | + | minmutaterate = .09 |
− | C = range(100) | + | C = range(100) |
</syntaxhighlight> | </syntaxhighlight> |
Turkish
A B C D E F G H I J K L M N O P R S T U V Y Z a b c d e f g h i j k l m n o p r s t u v y z Ç ç Ğ ğ İ ı Ö ö Ş ş Ü ü
English
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z
1 # code - http://rosettacode.org/wiki/Evolutionary_algorithm
2
3 from string import letters
4 from random import choice, random
5
6 target = list("METHINKS IT IS LIKE A WEASEL")
7 charset = letters + ' '
8 parent = [choice(charset) for _ in range(len(target))]
9 minmutaterate = .09
10 C = range(100)
hkilter.com by H. K. Ilter is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
© 2020 H. K. Ilter