from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Diya Ganguly' doc = """ """ class Constants(BaseConstants): name_in_url = 'Quiz' players_per_group = 2 num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): quiz2 = models.StringField(choices=[['1', 'True'], ['2', 'False']], label='2) You earn an additional benefit on top of your rental income if the renter chooses Action G.', widget=widgets.RadioSelectHorizontal) def quiz2_error_message(self, value): if value != '2': return 'The answer to the statement is wrong' quiz5 = models.StringField(choices=[['1', 'True'], ['2', 'False']], label='3) The person you play with changes through the decision-making task.', widget=widgets.RadioSelectHorizontal) def quiz5_error_message(self, value): if value != '2': return 'The answer to the statement is wrong' quiz6 = models.StringField( label='4) An example of a payoff table is given below. What is your payoff if you choose a fixed rental contract with discount value of 1 point and the renter chooses Action D? Please write your answer in the box given below') def quiz6_error_message(self, value): if value != '20': return 'The answer to the statement is wrong' Ques2 = models.StringField(choices=[['1', 'True'], ['2', 'False']], label='2) Action D is costlier to implement compared to Action G.', widget=widgets.RadioSelectHorizontal) def Ques2_error_message(self, value): if value != '1': return 'The answer to the statement is wrong' Ques5 = models.StringField(choices=[['1', 'True'], ['2', 'False']], label='3) The person you play with changes through the decision-making task.', widget=widgets.RadioSelectHorizontal) def Ques5_error_message(self, value): if value != '2': return 'The answer to the statement is wrong' Ques6 = models.StringField( label='4) An example of a payoff table is given below. What is your payoff if you receive a discounted rental contract of 1 point and you choose Action D? Please write your answer in the box given below.', ) def Ques6_error_message(self, value): if value != '11': return 'The answer to the statement is wrong' quiz8= models.StringField(choices=[['1','Owner'],['2','Renter']],label='1)What is your role in this Decision Task?',widget=widgets.RadioSelectHorizontal) def quiz8_error_message(self,value): if value!= '1': return 'The answer to the statement is wrong' Ques8=models.StringField(choices=[['1','Owner'],['2','Renter']],label='1)What is your role in this Decision Task?',widget=widgets.RadioSelectHorizontal) def Ques8_error_message(self, value): if value!='2': return 'The answer to the statement is wrong' class Player(BasePlayer): pass