from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Course6900Survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='How old are you?', max=125, min=13) gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female'], ['Non-binary', 'Non-binary'], ['Prefer not to say', 'Prefer not to say']], label='What is your gender?') EmploymentStatus = models.StringField(choices=[['Yes, full-time', 'Yes, full-time'], ['Yes, part-time', 'Yes, part-time'], ['No, not currently employed', 'No, not currently employed'], ['Retired', 'Retired'], ['Student', 'Student']], label='Are you currently employed?') MaritalStatus = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='Are you currently married or in a domestic partnership?') Education = models.StringField(choices=[['High school or less', 'High school or less'], ['Some college or vocational training', 'Some college or vocational training'], ["Bachelor's degree", "Bachelor's degree"], ["Master's degree", "Master's degree"], ['Doctorate or professional degree', 'Doctorate or professional degree']], label='What is the highest level of education you have completed?') HouseholdIncome = models.StringField(choices=[['Under $25,000', 'Under $25,000'], ['$25,000 - $49,999', '$25,000 - $49,999'], ['$50,000 - $74,999', '$50,000 - $74,999'], ['$75,000 - $99,999', '$75,000 - $99,999'], ['$100,000 - $149,999', '$100,000 - $149,999'], ['$150,000 or more', '$150,000 or more']], label='How much is your family income?') Risk1 = models.StringField(choices=[['Gain $1000 ', 'Gain $1000 '], ['Lose $500', 'Lose $500'], ['Indifferent', 'Indifferent']], label='How would you react to a 50-50 chance of gaining $1000 or losing $500?') Risk2 = models.StringField(choices=[['Option A: Guaranteed $200 profit', 'Option A: Guaranteed $200 profit'], ['Option B: 50% chance of $400 profit, 50% chance of $0 profit', 'Option B: 50% chance of $400 profit, 50% chance of $0 profit']], label='Imagine you have $1000 to invest. Which investment option would you choose?') Risk3 = models.StringField(choices=[['Very Uncomfortable', 'Very Uncomfortable'], ['Somewhat Uncomfortable', 'Somewhat Uncomfortable'], ['Neutral', 'Neutral'], ['Somewhat Comfortable', 'Somewhat Comfortable'], ['Very Comfortable', 'Very Comfortable']], label='How comfortable are you with investing in the stock market?') Risk4 = models.StringField(choices=[['A: A guaranteed win of $50', 'A: A guaranteed win of $50'], ['B: A 50% chance of winning $100, 50% chance of winning $0', 'B: A 50% chance of winning $100, 50% chance of winning $0']], label='In a game of chance, would you prefer:') Risk5 = models.StringField(choices=[['$200 today', '$200 today'], ['50% chance of $500 tomorrow', '50% chance of $500 tomorrow'], ['Indifferent', 'Indifferent']], label='Would you rather receive $200 today or take a 50% chance of receiving $500 tomorrow?') Risk6 = models.StringField(choices=[['Strongly Dislike', 'Strongly Dislike'], ['Dislike', 'Dislike'], ['Neutral', 'Neutral'], ['Like', 'Like'], ['Strongly Like', 'Strongly Like']], label='How do you feel about gambling at a casino?') Risk7 = models.StringField(choices=[['Never', 'Never'], ['Rarely', 'Rarely'], ['Occasionally', 'Occasionally'], ['Often', 'Often'], ['Very Often', 'Very Often']], label='How often do you participate in risky activities such as extreme sports or gambling?') Risk8 = models.StringField(choices=[['Option A: A 1% chance of winning $10,000', 'Option A: A 1% chance of winning $10,000'], ['Option B: A 10% chance of winning $1,000', 'Option B: A 10% chance of winning $1,000']], label='Imagine you have the opportunity to participate in a lottery. Which option would you prefer?') ThankYou = models.StringField(initial='Thank You For Your Participation!') class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender', 'EmploymentStatus', 'MaritalStatus', 'Education', 'HouseholdIncome'] class Risk(Page): form_model = 'player' form_fields = ['Risk1', 'Risk2', 'Risk3', 'Risk4', 'Risk5', 'Risk6', 'Risk7', 'Risk8'] class EndPage(Page): form_model = 'player' form_fields = ['ThankYou'] page_sequence = [Demographics, Risk, EndPage]