from otree.api import Currency as c, currency_range from .pages import * from ._builtin import Bot from .models import Constants import random class PlayerBot(Bot): def play_round(self): big_five_keys = [f'bigfive_{i}' for i in range(10)] big_five_values = [random.randint(1, 5) for _ in range(10)] big_five_answer = dict(zip(big_five_keys, big_five_values)) # yield (Follow_Up, {'Follow_up_1': "X", # 'Follow_up_2': "Y", # 'Follow_up_3': "Z" # }) yield (BigFive, big_five_answer) humility_keys = [f'humility_{i}' for i in range(10)] humility_values = [random.randint(1, 5) for _ in range(10)] humility_answer = dict(zip(humility_keys, humility_values)) yield (Humility, humility_answer) yield (Follow_Up, dict( Follow_up_1="..", Follow_up_2 = "...") ) yield (More_comments, dict( Follow_up_3="3", Follow_up_4 = "4", Follow_up_5 = "5", Follow_up_6 = "6") ) yield ThankYou