from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) import statistics from random import * doc = """ Welcome """ class Constants(BaseConstants): name_in_url = 'Welcome' players_per_group = None num_rounds = 1 instructions_template = 'public_goods/instructions.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): riskpref = models.FloatField( min=0, max=20, label='' ) timepref = models.FloatField( min=0, max=80, label='' ) f1 = models.StringField( choices=[['0', '0%'], ['0', '25%'], ['0', '50%'], ['0', '75%'], ['1', '100%']], label='Question 1', widget=widgets.RadioSelectHorizontal, ) f2 = models.StringField( choices=[['0', '0%'], ['0', '25%'], ['1', '50%'], ['0', '75%'], ['0', '100%']], label='Question 2', widget=widgets.RadioSelectHorizontal, ) f3 = models.StringField( choices=[['0', '0'], ['0', '25'], ['1', '66'], ['0', '78'], ['0', '97']], label='Question 3', widget=widgets.RadioSelectHorizontal, ) f4 = models.BooleanField( choices=[[True, 'True'], [False, 'False']], label='Question 4', widget=widgets.RadioSelectHorizontal ) f5 = models.BooleanField( choices=[[True, '₡ 29,00'], [False, '₡ 49,00']], label='Question 5', widget=widgets.RadioSelectHorizontal ) fc5 = models.BooleanField( choices=[[True, '₡ 29,50'], [False, '₡ 44,00']], label='Question 6', widget=widgets.RadioSelectHorizontal ) f6 = models.BooleanField( choices=[[True, '₡ 49,00'], [False, '₡ 29,00']], label='Question 7', widget=widgets.RadioSelectHorizontal ) fc6 = models.BooleanField( choices=[[True, '₡ 44,00'], [False, '₡ 29,50']], label='Question 8', widget=widgets.RadioSelectHorizontal )