from otree.api import * c = cu doc = '' class Constants(BaseConstants): name_in_url = 'intro_demographics' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='What is your age?', max=130, min=13) gender = models.StringField(choices=[['female', 'female'], ['male', 'male'], ['other', 'other'], ['prefer not to say', 'prefer not to say']], label='What is your gender?') name = models.StringField(label='What is your fictitious name?') cognitive_reflection_1 = models.FloatField(label='A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost (in cents)?') cognitive_reflection2 = 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?') cognitive_reflection3 = 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?') hh_income = models.StringField(choices=[['less than 10.000', 'less than 10.000€'], ['10.000€-20.000€', '10.000€-20.000€'], ['20.000€-30.000€', '20.000€-30.000€'], ['30.000€-50.000€', '30.000€-50.000€'], ['50.000€-70.000€', '50.000€-70.000€'], ['70.000€-100.000€', '70.000€-100.000€'], ['100.000€-150.000€', '100.000€-150.000€'], ['more than 150.000€', 'more than 150.000€'], ['prefer not to say', 'prefer not to say']], label='Give us your best estimate of your yearly household income (considering the two highest earners)') program = models.StringField(choices=[['Master in Economics','Master in Economics'],['Master of Research','Master of Research'],['Other program at Barcelona GSE','Other program at Barcelona GSE'],['I am not in a graduate program at Barcelona GSE','I am not in a graduate program at Barcelona GSE'],['Prefer not to say','Prefer not to say']],label='What academic program are you in?') pprogram = models.LongStringField(label='What did you study before your graduate program? If you do not have a previous degree or study, please answer NA.') class Initial_Page(Page): form_model = 'player' class Demographics(Page): form_model = 'player' form_fields = ['name', 'age', 'gender', 'hh_income','program','pprogram'] class Cognitive_Reflection(Page): form_model = 'player' form_fields = ['cognitive_reflection_1', 'cognitive_reflection2', 'cognitive_reflection3'] page_sequence = [Initial_Page, Demographics, Cognitive_Reflection]