from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants from statistics import mean class Demographic(Page): form_model = 'player' form_fields = ['gender', 'age', 'edu', 'job', 'income', 'exp', 'ethnic'] class Results(Page): def vars_for_template(self): total_bonus = self.participant.vars['payoff'] self.participant.payoff = total_bonus exceed_11 = 1 if total_bonus < 11: exceed_11 = 0 self.participant.payoff = 11 return { 'bonus': total_bonus, 'exceed_11': exceed_11 } class Final(Page): pass page_sequence = [ Demographic, Results, Final ]