from email.policy import default from statistics import mode from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'screen_app' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): user_browser = models.StringField(blank=True) user_device = models.StringField(blank=True) screen1question_q1 = models.StringField(label = '1. Have you invested in any shares in the past?', widget=widgets.RadioSelect, choices=[[1,"Yes"] ,[2,"No"]]) screen1question_q2_1 = models.StringField(label = '2. Please enter your Prolific ID: ') screen1question_q2_2 = models.StringField(label = 'Please enter your Prolific ID again: ') screen2question_q1 = models.StringField(label = '1. What is Earnings Per Share?', widget=widgets.RadioSelect, choices=[[1,"The company’s net income divided by the total number of shares outstanding."] ,[2,"The company’s net income divided by the average assets."]]) screen2question_q2 = models.StringField(label = '2. Which of the following does not belong to the financial statements?', widget=widgets.RadioSelect, choices=[[1,"Balance sheet"] ,[2,"Income statement"], [3,"Cash flow statement"], [4,"Sustainability report"], ]) screen2question_q3 = models.StringField(label = '3. Which of the following is income?', widget=widgets.RadioSelect, choices=[[1,"Money received from selling a product"] ,[2,"Amount owed to the bank"], [3,"Amount contributed by the shareholders"] ]) # screen2question_q4 = models.StringField(label = '3. Which of the following is income?', # widget=widgets.RadioSelect, # choices=[[1,"The company’s net income divided by the total number of shares outstanding."] # ,[2,"The company’s net income divided by the average assets."]]) screen2question_q4 = models.StringField( choices=[ [0,'0 year'], [1, "1 year"], [2, "2 years"], [3, "3 years"], [4, "4 years"], [5, "5 years"], [6, "6 years"], [7, "7 years"], [8, "8 years"], [9, "9 years"], [10, "10 years"], [11, "11 years"], [12, "12 years"], [13, "13 years"], [14, "14 years"], [15, "15 years"], [16, "16 years"], [17, "17 years"], [18, "18 years"], [19, "19 years"], [20, "20 years"], [21, "21 years"], [22, "22 years"], [23, "23 years"], [24, "24 years"], [25, "25 years"], [26, "26 years"], [27, "27 years"], [28, "28 years"], [29, "29 years"], [30, "30 years"], [31, "31 years"], [32, "32 years"], [33, "33 years"], [34, "34 years"], [35, "35 years"], [36, "36 years"], [37, "37 years"], [38, "38 years"], [39, "39 years"], [40, "40 years"], [41, "41 years"], [42, "42 years"], [43, "43 years"], [44, "44 years"], [45, "45 years"], [46, "46 years"], [47, "47 years"], [48, "48 years"], [49, "49 years"], [50, "50+ years"], ], ) screen3question_q1 = models.StringField(label = 'Before starting, would you like to read the explanatory statement, which provides more details about this study but does not form part of the study?', widget=widgets.RadioSelect, choices=[[1,"Yes"] ,[2,"No"]])