from otree.api import *
doc = """
Instructions for misconfidence
"""
class C(BaseConstants):
NAME_IN_URL = 'Instructions_Y'
PLAYERS_PER_GROUP = None
NUM_ROUNDS = 1
class Subsession(BaseSubsession):
pass
class Group(BaseGroup):
pass
class Player(BasePlayer):
comprehension11 = models.IntegerField(
choices=[[1, '12'], [2, '7'], [3, '11'], [4, '10']],
widget=widgets.RadioSelect,
label='Suppose Player0 picks a price of 15. What is the average price set by the computers?',
)
comprehension12 = models.IntegerField(
choices=[[1, '168'], [2, '149'], [3, '190'], [4, '191']],
widget=widgets.RadioSelect,
label='If Player0 picks 15, then the average price set by the computers is 11. What is Player0 nominal income in this case?'
)
comprehension13 = models.IntegerField(
choices=[[1, '13.55'], [2, '17.27'], [3, '15.27'], [4, '19.10']],
widget=widgets.RadioSelect,
label=' If Player0 picks 15, then the average price set by the computers is 11. What is Player0 real income in this case?'
)
comprehension21 = models.IntegerField(
choices=[[1, '14'], [2, '13'], [3, '12'], [4, '15']],
widget=widgets.RadioSelect,
label='What is the average price set by the computers?'
)
comprehension22 = models.IntegerField(
choices=[[1, '18'], [2, '19'], [3, '17'], [4, '16']],
widget=widgets.RadioSelect,
label='What is the overall rounded average price (Player0 price and the price set by the three computers)?'
)
class GeneralRules(Page):
pass
class Instructions0(Page):
pass
class Player0Game(Page):
pass
class InstructionsPlayer1(Page):
pass
class InstructionsPlayer2(Page):
pass
class Comprehension11(Page):
form_model = 'player'
form_fields = ['comprehension11']
class WrongComp11(Page):
def is_displayed(self):
return self.comprehension11 != 3
class RightComp11(Page):
def is_displayed(self):
return self.comprehension11 == 3
class Comprehension12(Page):
form_model = 'player'
form_fields = ['comprehension12']
class WrongComp12(Page):
def is_displayed(player):
return player.comprehension12 != 1
class RightComp12(Page):
def is_displayed(self):
return self.comprehension12 == 1
class Comprehension13(Page):
form_model = 'player'
form_fields = ['comprehension13']
class WrongComp13(Page):
def is_displayed(player):
return player.comprehension13 != 3
class RightComp13(Page):
def is_displayed(self):
return self.comprehension13 == 3
class Comprehension21(Page):
form_model = 'player'
form_fields = ['comprehension21']
class WrongComp21(Page):
def is_displayed(player):
return player.comprehension21 != 4
class RightComp21(Page):
def is_displayed(player):
return player.comprehension21 == 4
class Comprehension22(Page):
form_model = 'player'
form_fields = ['comprehension22']
class WrongComp22(Page):
def is_displayed(player):
return player.comprehension22 != 2
class RightComp22(Page):
def is_displayed(player):
return player.comprehension22 == 2
page_sequence = [GeneralRules,
Instructions0,
Player0Game,
Comprehension11,
WrongComp11,
RightComp11,
Comprehension12,
WrongComp12,
RightComp12,
Comprehension13,
WrongComp13,
RightComp13,
InstructionsPlayer1,
InstructionsPlayer2,
Comprehension21,
WrongComp21,
RightComp21,
Comprehension22,
WrongComp22,
RightComp22]