from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random class Constants(BaseConstants): name_in_url = 'survey1' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): firstname = models.IntegerField( verbose_name='What is your first name?', ) birthyear = models.IntegerField( verbose_name='What is your birth year?', min=1990, max=2002) birthmonth = models.StringField( choices=['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], verbose_name='What is your birth month?', widget=widgets.RadioSelect) birthday = models.IntegerField( verbose_name='What is your birthday?', min=1, max=31) major = models.StringField( choices=['Geisteswissenschaften', 'Sport', 'Rechts -, Wirtschafts -, Sozialwissenschaften', 'Mathematik / Naturwissenschaften', 'Humanmedizin und Gesundheitswissenschaften', 'Agrar, Forst, Ernährungswissenschaften', 'Veterinärmedizin', 'Ingenieurswissenschaften', 'Kunst und Kunstwissenschaft'], verbose_name='What are you studying?', widget=widgets.RadioSelect) height= models.IntegerField( verbose_name='What is your height (in cm)?', min=150, max=220) weight= models.IntegerField( verbose_name='What is your weight (in kg)?', min=45, max=250) exercise = models.IntegerField( verbose_name='On average, how many hours do you exercise in a week?', min=0, max=30) crt_bat = models.IntegerField( verbose_name=''' 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( verbose_name=''' "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( verbose_name=''' 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? ''' )