from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = '' class Constants(BaseConstants): name_in_url = 'basic' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): my_field = models.FloatField() def my_method(self): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(initial=0, label='what is your age?', max=100, min=0) likeRG = models.IntegerField(initial=0, label='how much do you like RG', max=10, min=0) agrrewithstmt = models.IntegerField(initial=0, label='do you agree with statement', max=10, min=0) RGfan = models.BooleanField(initial=False) grp = models.StringField(choices=[['E', ''], ['C', '']]) def IsRGfan(self): if (self.likeRG >=5): self.RGfan= True def my_method(self): pass