from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random class Constants(BaseConstants): name_in_url = 'survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): seat = models.IntegerField( label='What is your seat number?', min=1, max=30) age = models.IntegerField( label='What is your age in years?', min=13, max=125) gender = models.IntegerField( choices=[[1,'Male'], [0,'Female']], label='What is your gender?', widget=widgets.RadioSelect) study= models.IntegerField( choices=[[0,"Management/Business"], [1, 'Economics'],[2,"Humanities"],[3,"Liberal Arts"],[4,"Education"], [5,"Engineering"],[6,"Science"],[7,"Social Sciences"],[8,"Agriculture"], [9,"Pharmacy"], [10,"Nursing"], [11,"Other"]], label='What was the main field of study for your undergraduate degree?', widget=widgets.RadioSelect) birth = models.IntegerField( choices=[[0, "United States"], [1, 'Canada'], [2, "Mexico"], [3, "Central/South America"], [4, "Australia/New Zealand"], [5, "Other Pacific Nation"], [6, "China"], [7, "Hong Kong"], [8, "Taiwan"], [9, "East Asia"], [10, "South-East Asia"], [11, "South Asia"], [12,"Other Asia"], [13,"Europe"], [14, "Africa"] ], label='Where were you born?', widget=widgets.RadioSelect) outside = models.IntegerField( choices=[[0, "N/A"], [1, 'More than 10 years'], [2, "5-10 years"], [3, "2-5 years"], [4, "1-2 years"], [5, "Less than 1 year"]], label='If you were not born in the United States, how long have you lived in the United States?', widget=widgets.RadioSelect) race = models.IntegerField( choices=[[0, "Asian"], [1, 'Black'], [2, "Caucasian"], [3, "Hispanic"], [4, "Other"]], label='What do you consider your primary racial identity?', widget=widgets.RadioSelect) job = models.IntegerField( choices=[[0, "Agriculture"], [1, 'Computer / IT'], [2, "Construction"], [3, "Education"], [4, "Finance and Financial Services"], [5, "Health Care"], [6, "Media"], [7, "Retail Trade or Hospitality"], [8, "Wholesale Trade"], [9, "Other Services"], [10, "Government / Public Administration"], [11, "Manufacturing"], [12, "Transportation"], [13,"Other"]], label='In what industry is your current (or most recent) primary job?', widget=widgets.RadioSelect) years_in_job = models.IntegerField( label='For how many years have you worked in your current (or most recent) job?', min=0, max=100) years_of_work_experience = models.IntegerField( label='How many years of overall work experience do you have?', min=0, max=100) prices = models.IntegerField( choices=[[1, 'Yes'], [0, 'No']], label='Have you had responsibility for choosing prices in your current or any previous job?', widget=widgets.RadioSelect) 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? ''' )