from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = '' class Constants(BaseConstants): name_in_url = 'Chocolate_bar_choice' players_per_group = None num_rounds = 1 instructions_template = 'Chocolate_bar_choice/instructions.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): identifier = models.StringField(label='Write your personal identifier here (your name or if you prefer, sth only you know but please remember it)') crt_bat = models.IntegerField(label='A bat and a ball cost 22 dollars in total. The bat costs 20 dollars more than the ball. How many dollars does the ball cost?') crt_widget = models.IntegerField(label='If it takes 5 machines 5 minutes to make 5 widgets, how many minutes would it take 100 machines to make 100 widgets') crt_lake = models.IntegerField(label='In a lake there is a patch of lily pads. Every day the patch doubles in size. If it takes 48 days for the patch to cover the entire lake how many days would it take for the patch to cover half of the lake') C_Mars_Snickers = models.StringField(choices=[['Mars', 'Mars'], ['Snickers', 'Snickers']], label='Which of these would you like to choose?', widget=widgets.RadioSelect) c_Mars_Snickers_Twix = models.StringField(choices=[['Mars', 'Mars'], ['Snickers', 'Snickers'], ['Twix', 'Twix']], label='Which of the following do you want to choose?', widget=widgets.RadioSelect) Preference_Mars_Snickers = models.StringField(choices=[['I prefer Mars over Snickers', 'I prefer Mars over Snickers'], ['I prefer Snickers over Mars', 'I prefer Snickers over Mars'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect) Preference_Snickers_Twix = models.StringField(choices=[['I prefer Snickers over Twix', 'I prefer Snickers over Twix'], ['I prefer Twix over Snickers', 'I prefer Twix over Snickers'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following', widget=widgets.RadioSelect) Preference_Mars_Twix = models.StringField(choices=[['I prefer Mars over Twix', 'I prefer Mars over Twix'], ['I prefer Twix over Mars', 'I prefer Twix over Mars'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following', widget=widgets.RadioSelect) Preference_Snickers_Mars = models.StringField(choices=[['I prefer Snickers over Mars', 'I prefer Snickers over Mars'], ['I prefer Mars over Snickers', 'I prefer Mars over Snickers'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect) Preference_Twix_Snickers = models.StringField(choices=[['I prefer Twix over Snickers', 'I prefer Twix over Snickers'], ['I prefer Snickers over Twix', 'I prefer Snickers over Twix'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect) Preference_Twix_Mars = models.StringField(choices=[['I prefer Twix over Mars', 'I prefer Twix over Mars'], ['I prefer Mars over Twix', 'I prefer Mars over Twix'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect) Preference2_Mars_Snickers = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Mars is at least as good as Snickers (tick one of the following)', widget=widgets.RadioSelect) Preference2_Snickers_Twix = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Snickers is at least as good as Twix (tick one of the following)', widget=widgets.RadioSelect) Preference2_Mars_Twix = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Mars is at least as good as Twix (tick one of the following)', widget=widgets.RadioSelect) Preference2_Snickers_Mars = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Snickers is at least as good as Mars (tick one of the following)', widget=widgets.RadioSelect) Preference2_Twix_Snickers = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Twix is at least as good as Snickers (tick one of the following)', widget=widgets.RadioSelect) Preference2_Mars_Mars = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Mars is at least as good as Mars (tick one of the following)', widget=widgets.RadioSelect) Preference2_Twix_Twix = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Twix is at least as good as Twix (tick one of the following)', widget=widgets.RadioSelect) Preference2_Snickers_Snickers = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Snickers is at least as good as Snickers (tick one of the following)', widget=widgets.RadioSelect) Preference2_Twix_Mars = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='You think Twix is at least as good as Mars (tick one of the following)', widget=widgets.RadioSelect) c_Snickers_Twix = models.StringField(choices=[['Snickers', 'Snickers'], ['Twix', 'Twix']], label='Which of these would you like to choose?', widget=widgets.RadioSelect) Preference_Twix_Twix = models.StringField(choices=[['– I prefer Twix over Twix', '– I prefer Twix over Twix'], ['– I (also) prefer Twix over Twix', '– I (also) prefer Twix over Twix'], ['– I am indifferent', '– I am indifferent'], ["– I can't say", "– I can't say"]], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect) Preference_Snickers_Snickers = models.StringField(choices=[], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect) Preference_Mars_Mars = models.StringField(choices=[['I prefer Mars over Mars', 'I prefer Mars over Mars'], ['I (also) prefer Mars over Mars', 'I (also) prefer Mars over Mars'], ['I am indifferent', 'I am indifferent'], ["I can't say", "I can't say"]], label='Which of these two do you prefer? Tick one of the following ', widget=widgets.RadioSelect)