from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = '' class Constants(BaseConstants): name_in_url = 'Risky' players_per_group = None num_rounds = 1 instructions_template = 'Risky/instructions.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): identifier = models.IntegerField(label='Write your first personal identifier (for the drawing) here', max=9999, min=1000) identifier2 = models.IntegerField(label='Write your 2nd indentifier (for collection of rewards) here', max=9999, min=1000) Binary_lottery_choice1 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Binary_lottery_choice2 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery10 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery20 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery30 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery40 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery50 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery60 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery70 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery80 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) Lottery90 = models.IntegerField(choices=[[1, 'A'], [2, 'B']], label='', widget=widgets.RadioSelectHorizontal) prob0 = models.FloatField(label='Which value of p would make you indifferent between the lottery and a sure payment of 0 Euro?', max=1, min=0) prob2 = models.FloatField(label='Which value of p would make you indifferent between the lottery and a sure payment of 2 Euro?', max=1, min=0) prob4 = models.FloatField(label='Which value of p would make you indifferent between the lottery and a sure payment of 4 Euro?', max=1, min=0) prob6 = models.FloatField(label='Which value of p would make you indifferent between the lottery and a sure payment of 6 Euro?', max=1, min=0) prob8 = models.FloatField(label='Which value of p would make you indifferent between the lottery and a sure payment of 8 Euro?', max=1, min=0) prob10 = models.FloatField(label='Which value of p would make you indifferent between the lottery and a sure payment of 10 Euro?', max=1, min=0)