from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Your name here' doc = """ Your app description """ # yes or no def make_ans(): return models.StringField( choices=['Yes', 'No'], widget=widgets.RadioSelectHorizontal, ) class Constants(BaseConstants): name_in_url = 'quiz' players_per_group = None num_rounds = 1 num_quiz = 8 solutions = ['No', 'No', 'Yes', 'No', 'Yes', 'No', '∅', '2'] class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): num_correct_ans = models.IntegerField() ans1 = make_ans() ans2 = make_ans() ans3 = make_ans() ans4 = make_ans() ans5 = make_ans() ans6 = make_ans() ans7 = models.StringField( choices=['1', '2', '3', '4', '∅'], widget=widgets.RadioSelectHorizontal, ) ans8 = models.StringField( choices=['1', '2', '3', '4', '∅'], widget=widgets.RadioSelectHorizontal, ) pass