from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'b_nso_lg_ed_info' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): quiz1 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='This is Oval’s mission statement: We aim to become the most successful electronics company in providing superior products and services to our customers, thereby delivering long-term value to our shareholders.', widget=widgets.RadioSelect) quiz2 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='Generating a positive return is important to Oval because Oval uses the returns to help fund operations in subsequent years.', widget=widgets.RadioSelect) quiz3 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='Each year, Oval sets aside 3,000 Lira (30% of its total assets) for investing in financial assets.', widget=widgets.RadioSelect) quiz4 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='You will make an investment decision for Oval in each of four years, and these decisions are independent from each other.', widget=widgets.RadioSelect) quiz5 = models.StringField(choices=[['a', '0 Lira'], ['b', '5 Lira'], ['c', '10 Lira'], ['d', '30 Lira']], label='Suppose you invest in 10 financial assets and none of them are the “bad” investment. What is the total amount of EXPECTED RETURNS?', widget=widgets.RadioSelect) quiz6 = models.StringField(choices=[['a', '0 Lira'], ['b', '0.5 Lira'], ['c', '1 Lira'], ['d', '6 Lira']], label='Suppose you invest in 10 financial assets and none of them are the “bad” investment. What is the total amount of YOUR BONUS?', widget=widgets.RadioSelect) quiz7 = models.StringField(choices=[['a', '0 Lira'], ['b', '30 Lira'], ['c', '120 Lira'], ['d', '150 Lira']], label='Suppose you invest in 10 financial assets and one of them is the “bad” investment. What is the total amount of EXPECTED RETURNS?', widget=widgets.RadioSelect) quiz8 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='Investing in the “bad” investment harms Oval, because Oval loses the initial investment amount and earns no returns to fund main operations in the next year. ', widget=widgets.RadioSelect) quiz9 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='Each of the 100 financial assets has the same chance of being the “bad” investment.', widget=widgets.RadioSelect) quiz10 = models.StringField(choices=[['T', 'True'], ['F', 'False']], label='When making your investment decision each year, you do not know which financial asset is the “bad” investment.', widget=widgets.RadioSelect) def quiz3_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. Each year, Oval sets aside 3,000 Lira (30% of its total assets) for investing in financial assets. Please try again." def quiz4_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. You will make an investment decision for Oval in each of four years, and these decisions are independent from each other. Please try again." def quiz5_error_message(player: Player, value): print('value is', value) if value != 'd': return "Your answer is incorrect. If you invested in 10 financial assets and none of them are the “bad” investment, the total amount of expected return will be 30 Lira (300 Lira x 10% [initial investment amount x expected return]). Please try again." def quiz6_error_message(player: Player, value): print('value is', value) if value != 'd': return "Your answer is incorrect. If you invested in 10 financial assets and none of them are the “bad” investment, the total amount of your bonus is 6 Lira (300 Lira x 10% x 20% [initial investment amount x expected return x bonus rate]). Please try again." def quiz7_error_message(player: Player, value): print('value is', value) if value != 'a': return "Your answer is incorrect. If you invested in 10 financial assets and one of them is the “bad” investment, the total amount of expected returns will be 0. The “bad” investment eliminates the returns from the other financial assets. Please try again." def quiz8_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. Investing in the “bad” investment harms Oval because Oval loses the initial investment amount and earns no returns to fund main operations in the next year. Please try again." def quiz9_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. Each of the 100 financial assets has the same chance of being the “bad” investment. Please try again." def quiz10_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. When making your investment decision each year, you do not know which financial asset is the “bad” investment. Please try again." def quiz1_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. Oval's mission statement: We aim to become the most successful electronics company in providing superior products and services to our customers, thereby delivering long-term value to our shareholders. Please try again." def quiz2_error_message(player: Player, value): print('value is', value) if value != 'T': return "Your answer is incorrect. Generating a positive return is important because Oval uses the returns to help fund operations in subsequent years. Please try again." Player.quiz3_error_message = quiz3_error_message Player.quiz4_error_message = quiz4_error_message Player.quiz5_error_message = quiz5_error_message Player.quiz6_error_message = quiz6_error_message Player.quiz7_error_message = quiz7_error_message Player.quiz8_error_message = quiz8_error_message Player.quiz9_error_message = quiz9_error_message Player.quiz10_error_message = quiz10_error_message class Overview1(Page): form_model = 'player' class Overview2(Page): form_model = 'player' class LE(Page): form_model = 'player' class Quiz_Instruction(Page): form_model = 'player' class L_quiz1(Page): form_model = 'player' form_fields = ['quiz1'] class L_quiz2(Page): form_model = 'player' form_fields = ['quiz2'] class L_quiz3(Page): form_model = 'player' form_fields = ['quiz3'] class L_quiz4(Page): form_model = 'player' form_fields = ['quiz4'] class L_quiz5(Page): form_model = 'player' form_fields = ['quiz5', 'quiz6'] class L_quiz6(Page): form_model = 'player' form_fields = ['quiz7', 'quiz8'] class L_quiz7(Page): form_model = 'player' form_fields = ['quiz9'] class L_quiz8(Page): form_model = 'player' form_fields = ['quiz10'] class Quiz_Complete(Page): form_model = 'player' @staticmethod def app_after_this_page(player: Player, upcoming_apps): return "b_nso_lg_ed_rounds" page_sequence = [Overview1, Overview2, LE, Quiz_Instruction, L_quiz1, L_quiz2, L_quiz3, L_quiz4, L_quiz5, L_quiz6, L_quiz7, L_quiz8, Quiz_Complete]