from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'Lotteries' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): s_lottery = models.StringField( label="Choose between", widget=widgets.RadioSelect, choices=[["1", "A) A sure profit of 190 "], ['2', "B) A 20 percent chance to gain 1000, and 80 percent chance to gain nothing"]] ) d_lottery1 = models.StringField( label="Decision (1): Choose between", widget=widgets.RadioSelect, choices=[["1", "A) A candidate with a sure profit of 240 generated"], ["2", "B) A candidate with a 25 percent chance to generate a profit of 1000, and 75 percent chance to generate nothing"]] ) d_lottery2 = models.StringField( label="Decision (2): Choose between", widget=widgets.RadioSelect, choices=[["3", "C) A candidate with a sure loss of 750 generated"], ["4", "D) A candidate with a 75 percent chance to cause a loss of 1000, and 25 percent chance to lose nothing"]] ) cons_lottery1 = models.StringField( label="Decision (1): Choose between", widget=widgets.RadioSelect, choices=[["1", "A) A candidate with a sure profit of 190 generated"], ["2", "B) A candidate with a 20 percent chance to generate a profit of 1000, and 80 percent chance to generate nothing"]] ) cons_lottery2 = models.StringField( label="Decision (2): Choose between", widget=widgets.RadioSelect, choices=[["3", "C) A candidate with a sure loss of 800 generated"], ["4", "D) A candidate with a 80 percent chance to cause a loss of 1000, and 20 percent chance to lose nothing"]] ) comb_lottery = models.StringField( label="Choose between", widget=widgets.RadioSelect, choices=[["1", "A) A candidate with a 25 percent chance of generating a profit of 240 and a 75 percent chance of generating losses of 760"], ["2", "B) A candidate with a 25 percent chance of generating a profit of 250 and a 75 percent chance of losing 750"]] ) complex_single = models.FloatField( label="I would rate the complexity/difficulty of this task as (0% simple – 100% difficult):", min=0, max=100 ) complex_double = models.FloatField( label="I would rate the complexity/difficulty of this task as (0% simple – 100% difficult):", min=0, max=100 ) complex_consistency = models.FloatField( label="I would rate the complexity/difficulty of this task as (0% simple – 100% difficult):", min=0, max=100 ) complex_combined = models.FloatField( label="I would rate the complexity/difficulty of this task as (0% simple – 100% difficult):", min=0, max=100 )