This file contains hidden or 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
| import random | |
| # Инициализируем веса | |
| weights = [1.0, 1.0, 1.0] | |
| learning_rate = 0.1 | |
| ks_rate = 1 | |
| ks = 2.5 | |
| def predict(inputs): | |
This file contains hidden or 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
| import random | |
| file = 'Memory.txt' | |
| memeory_reboot = open(file,'w') | |
| memeory_reboot.close() | |
| bit = [] | |
| for i in range(3): | |
| bit.append(random.randint(0,1)) | |
| print(f'/nВаша задача научить программу угадывать, что будет в ответе.\nВ ответе всегда число из списка {bit}, которое попадается большее количество раз.\nВам покажут список из трех элементов и ответ программы, а вы скажете правильный ли ответ.') | |
| input('Если готовы, то нажмите Enter') | |
| stop = 0 |