from otree.api import * c = cu doc = '' class Constants(BaseConstants): name_in_url = 'survey_and_risk_pref' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): your_id = models.StringField(label='Please write your ID if you are student of Behavioral and Experimental Economics (Fall 2021) course. Otherwise, write any random number more than 1000.') age = models.IntegerField(label='What is your age?') gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female']], label='What is your gender?', widget=widgets.RadioSelectHorizontal) risk = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']], label='How do you see yourself: Are you generally a person who is fully prepared to take risks or do you try to avoid taking risks? (1 - risk averse, 10 - fully prepared to take risks)', widget=widgets.RadioSelectHorizontal) cheat = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']], label='How often do you cheat at university? (10 - always, 1 - never)', widget=widgets.RadioSelectHorizontal) gpa = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']], label='What is your cumulative GPA (rounded)?', widget=widgets.RadioSelectHorizontal) income = models.StringField(choices=[['<10 000 rubles', '<10 000 rubles'], ['10 000 - 20 000 rubles', '10 000 - 20 000 rubles'], ['20 000 - 40 000 rubles', '20 000 - 40 000 rubles'], ['40 000 - 70 000 rubles', '40 000 - 70 000 rubles'], ['70 000 - 100 000 rubles', '70 000 - 100 000 rubles'], ['>100 000 rubles', '>100 000 rubles']], label='What is your monthly income?', widget=widgets.RadioSelect) cheat_opinion = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']], label='Do you agree that cheating behavior is wrong? (10 - absolutely agree, 1 - absolutely disagree)', widget=widgets.RadioSelectHorizontal) h1 = models.StringField(choices=[['10% chance $20 or 90% chance $16', '10% chance $20 or 90% chance $16'], ['10% chance $38 or 90% chance $1', '10% chance $38 or 90% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h2 = models.StringField(choices=[['20% chance $20 or 80% chance $16', '20% chance $20 or 80% chance $16'], ['20% chance $38 or 80% chance $1', '20% chance $38 or 80% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h3 = models.StringField(choices=[['30% chance $20 or 70% chance $16', '30% chance $20 or 70% chance $16'], ['30% chance $38 or 70% chance $1', '30% chance $38 or 70% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h4 = models.StringField(choices=[['40% chance $20 or 60% chance $16', '40% chance $20 or 60% chance $16'], ['40% chance $38 or 60% chance $1', '40% chance $38 or 60% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h5 = models.StringField(choices=[['50% chance $20 or 50% chance $16', '50% chance $20 or 50% chance $16'], ['50% chance $38 or 50% chance $1', '50% chance $38 or 50% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h6 = models.StringField(choices=[['60% chance $20 or 40% chance $16', '60% chance $20 or 40% chance $16'], ['60% chance $38 or 40% chance $1', '60% chance $38 or 40% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h7 = models.StringField(choices=[['70% chance $20 or 30% chance $16', '70% chance $20 or 30% chance $16'], ['70% chance $38 or 30% chance $1', '70% chance $38 or 30% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h8 = models.StringField(choices=[['80% chance $20 or 20% chance $16', '80% chance $20 or 20% chance $16'], ['80% chance $38 or 20% chance $1', '80% chance $38 or 20% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h9 = models.StringField(choices=[['90% chance $20 or 10% chance $16', '90% chance $20 or 10% chance $16'], ['90% chance $38 or 10% chance $1', '90% chance $38 or 10% chance $1']], label='', widget=widgets.RadioSelectHorizontal) h10 = models.StringField(choices=[['100% chance $20 or 0% chance $16', '100% chance $20 or 0% chance $16'], ['100% chance $38 or 0% chance $1', '100% chance $38 or 0% chance $1']], label='', widget=widgets.RadioSelectHorizontal) class Survey_ID(Page): form_model = 'player' form_fields = ['your_id'] class Survey(Page): form_model = 'player' form_fields = ['age', 'gender', 'income', 'gpa', 'risk', 'cheat', 'cheat_opinion'] class Desc_HL(Page): form_model = 'player' class Holt_risk(Page): form_model = 'player' form_fields = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8', 'h9', 'h10'] class Instruction(Page): form_model = 'player' page_sequence = [Survey_ID, Survey, Desc_HL, Holt_risk, Instruction]