#Income Dynamics, Income Sources and Preferences for Redistribution: Otree #University of Guelph, F.A.R.E Laboratory #Faculty Supervisors: Tongzhe Li and Bradley Ruffle #Programmers: Mitchell Ubene, Mark Patton, Zhelong Chen from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random import itertools doc = """ This is the introduction app """ class Constants(BaseConstants): name_in_url = 'Introduction' players_per_group = 3 num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Practicescore = models.PositiveIntegerField(initial = 0) introduction_payoff = models.PositiveIntegerField(initial = 0) Q1Test = models.StringField(choices=[['59, 80, 101', '59, 80, 101'], ['62, 80, 98', '62, 80, 98'], ['50, 80, 110', '50, 80, 110'], ['65, 80, 95', '65, 80, 95'], ['74, 80, 86', '74, 80, 86']], label='1. With the initial incomes of $50, $80 and $110, suppose that the three group members chose income-tax rates of 30%, 40%, and 80%. Using the table provided, what would be the after-tax incomes of the three group members?', widget=widgets.RadioSelect) Q2Test = models.StringField(choices=[['59, 80, 101', '59, 80, 101'], ['62, 80, 98', '62, 80, 98'], ['50, 80, 110', '50, 80, 110'], ['56, 80, 104', '56, 80, 104'], ['65, 80, 95', '65, 80, 95']], label='2. With the initial incomes of $50, $80 and $110, suppose that the three group members chose income-tax rates of 0%, 0%, and 0%. Using the table provided, what would be the after-tax incomes of the three group members?', widget=widgets.RadioSelect) Q3Test = models.StringField(choices=[['59, 80, 101', '59, 80, 101'], ['80, 80, 80', '80, 80, 80'], ['50, 80, 110', '50, 80, 110'], ['56, 80, 104', '56, 80, 104'], ['53, 80, 107', '53, 80, 107']], label='3. With the initial incomes of $50, $80 and $110, suppose that the three group members chose income-tax rates of 10%, 20%, and 100%. Using the table provided, what would be the after-tax incomes of the three group members?', widget=widgets.RadioSelect) Q4Test = models.StringField(choices=[['59, 80, 101', '59, 80, 101'], ['62, 80, 98', '62, 80, 98'], ['50, 80, 110', '50, 80, 110'], ['56, 80, 104', '56, 80, 104'], ['80, 80, 80', '80, 80, 80']], label='4. With the initial incomes of $50, $80 and $110, suppose that the three group members chose income-tax rates of 100%, 100%, and 100%. Using the table provided, what would be the after-tax incomes of the three group members?', widget=widgets.RadioSelect) Q5Test = models.StringField(choices=[['59, 80, 101', '59, 80, 101'], ['62, 80, 98', '62, 80, 98'], ['50, 80, 110', '50, 80, 110'], ['56, 80, 104', '56, 80, 104'], ['65, 80, 95', '65, 80, 95']], label='5. With the initial incomes of $50, $80 and $110, suppose that the three group members chose income-tax rates of 20%, 50%, and 70%. Using the table provided, what would be the after-tax incomes of the three group members?', widget=widgets.RadioSelect) Q1 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 5+8-2+3-10", choices = [[1, '5'], [2, '8'], [3, '4'], [4, '10'] ], widget = widgets.RadioSelect ()) Q2 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 5+8-(-2)+3-4-5", choices = [[1, '10'], [2, '7'], [3, '9'], [4, '14'] ], widget = widgets.RadioSelect ()) Q3 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 1+1+1-1-(-1)+1", choices = [[1, '4'], [2, '1'], [3, '2'], [4, '3'] ], widget = widgets.RadioSelect ()) Q4 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 1+6+3-2+8", choices = [[1, '7'], [2, '15'], [3, '16'], [4, '6'] ], widget = widgets.RadioSelect ()) Q5 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 2+1-5+4", choices = [[1, '4'], [2, '2'], [3, '5'], [4, '3'] ], widget = widgets.RadioSelect ()) Q6 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 6+6+5+2+2-9", choices = [[1, '20'], [2, '12'], [3, '13'], [4, '18'] ], widget = widgets.RadioSelect ()) Q7 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 10-3-3+7-2", choices = [[1, '5'], [2, '11'], [3, '9'], [4, '3'] ], widget = widgets.RadioSelect ()) Q8 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 11+8+3-4+5-2", choices = [[1, '21'], [2, '18'], [3, '23'], [4, '20'] ], widget = widgets.RadioSelect ()) Q9 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 7-8+3-9", choices = [[1, '-5'], [2, '0'], [3, '-6'], [4, '-7'] ], widget = widgets.RadioSelect ()) Q10 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 2+3+0+9-(-3)", choices = [[1, '17'], [2, '14'], [3, '12'], [4, '16'] ], widget = widgets.RadioSelect ()) Q11 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 10+10-7+3+1", choices = [[1, '23'], [2, '18'], [3, '17'], [4, '11'] ], widget = widgets.RadioSelect ()) Q12 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 11+11+11-9+2", choices = [[1, '28'], [2, '19'], [3, '24'], [4, '26'] ], widget = widgets.RadioSelect ()) Q13 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 3+4+1-5+2", choices = [[1, '4'], [2, '5'], [3, '2'], [4, '9'] ], widget = widgets.RadioSelect ()) Q14 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 9+0-3+0-6", choices = [[1, '8'], [2, '1'], [3, '0'], [4, '3'] ], widget = widgets.RadioSelect ()) Q15 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 7+7+7-8+1", choices = [[1, '15'], [2, '14'], [3, '21'], [4, '18'] ], widget = widgets.RadioSelect ()) Q16 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 2+9+5+4-2", choices = [[1, '14'], [2, '18'], [3, '20'], [4, '17'] ], widget = widgets.RadioSelect ()) Q17 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 2+9-7-3+5", choices = [[1, '4'], [2, '1'], [3, '2'], [4, '6'] ], widget = widgets.RadioSelect ()) Q18 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 15+14-6+1", choices = [[1, '24'], [2, '19'], [3, '25'], [4, '30'] ], widget = widgets.RadioSelect ()) Q19 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 20-4-6-1-3", choices = [[1, '4'], [2, '6'], [3, '10'], [4, '7'] ], widget = widgets.RadioSelect ()) Q20 = models.IntegerField (initial = 0, verbose_name = "What is the answer to this question" " 30-20+4-10+3", choices = [[1, '6'], [2, '7'], [3, '12'], [4, '10'] ], widget = widgets.RadioSelect ())