from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) from django import forms from otree import widgets from django import template from django_countries import Countries from django.contrib.auth import get_user_model from django.contrib.auth.models import AbstractBaseUser # UserModel = get_user_model() # if issubclass(UserModel, AbstractBaseUser): # UserModel._default_manager.filter().update(last_login=None) import random from decimal import Decimal author = 'Sarah' doc = """ Big five short (BFI-S) is a subset of big five consisting of 15 items. The BFI-S has been developed by Gerlitz and Schupp (2005) and was also part of the 2005 and 2009 waves of the SOEP. """ class Constants(BaseConstants): name_in_url = 'BFI_S' players_per_group = None num_rounds = 1 paying_round = random.randint(1, 10) instructions_template = 'BFI_S/Instruction.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): # total_score = models.IntegerField() pass class Player(BasePlayer): age = models.IntegerField( choices=[[1, 'less than 15'], [2, '15-20'], [3, ' 20-25'], [4, '25 - 30'], [5, '30 - 35'], [6, '35 - 40'], [7, '40 - 45'], [8, '45 - 50'], [9, '50 - 55'], [10, '55 - 60'], [11, '60 - 65'], [12, '65 or higher'] ], ) gender = models.StringField(widget=widgets.RadioSelect, choices=['Female', 'Male'] ) nationality = models.StringField( choices=[['AF', 'Afghanistan'], ['AL', 'Albania'], ['DZ', 'Algeria'], ['AS', 'American Samoa'], ['AD', 'Andorra'], ['AO', 'Angola'], ['AI', 'Anguilla'], ['AQ', 'Antarctica'], ['AG', 'Antigua And Barbuda'], ['AR', 'Argentina'], ['AM', 'Armenia'], ['AW', 'Aruba'], ['AU', 'Australia'], ['AT', 'Austria'], ['AZ', 'Azerbaijan'], ['BS', 'Bahamas'], ['BH', 'Bahrain'], ['BD', 'Bangladesh'], ['BB', 'Barbados'], ['BY', 'Belarus'], ['BE', 'Belgium'], ['BZ', 'Belize'], ['BJ', 'Benin'], ['BM', 'Bermuda'], ['BT', 'Bhutan'], ['BO', 'Bolivia'], ['BA', 'Bosnia And Herzegowina'], ['BW', 'Botswana'], ['BV', 'Bouvet Island'], ['BR', 'Brazil'], ['BN', 'Brunei Darussalam'], ['BG', 'Bulgaria'], ['BF', 'Burkina Faso'], ['BI', 'Burundi'], ['KH', 'Cambodia'], ['CM', 'Cameroon'], ['CA', 'Canada'], ['CV', 'Cape Verde'], ['KY', 'Cayman Islands'], ['CF', 'Central African Rep'], ['TD', 'Chad'], ['CL', 'Chile'], ['CN', 'China'], ['CX', 'Christmas Island'], ['CC', 'Cocos Islands'], ['CO', 'Colombia'], ['KM', 'Comoros'], ['CG', 'Congo'], ['CK', 'Cook Islands'], ['CR', 'Costa Rica'], ['CI', 'Cote D`ivoire'], ['HR', 'Croatia'], ['CU', 'Cuba'], ['CY', 'Cyprus'], ['CZ', 'Czech Republic'], ['DK', 'Denmark'], ['DJ', 'Djibouti'], ['DM', 'Dominica'], ['DO', 'Dominican Republic'], ['TP', 'East Timor'], ['EC', 'Ecuador'], ['EG', 'Egypt'], ['SV', 'El Salvador'], ['GQ', 'Equatorial Guinea'], ['ER', 'Eritrea'], ['EE', 'Estonia'], ['ET', 'Ethiopia'], ['FK', 'Falkland Islands (Malvinas)'], ['FO', 'Faroe Islands'], ['FJ', 'Fiji'], ['FI', 'Finland'], ['FR', 'France'], ['GF', 'French Guiana'], ['PF', 'French Polynesia'], ['TF', 'French S. Territories'], ['GA', 'Gabon'], ['GM', 'Gambia'], ['GE', 'Georgia'], ['DE', 'Germany'], ['GH', 'Ghana'], ['GI', 'Gibraltar'], ['GR', 'Greece'], ['GL', 'Greenland'], ['GD', 'Grenada'], ['GP', 'Guadeloupe'], ['GU', 'Guam'], ['GT', 'Guatemala'], ['GN', 'Guinea'], ['GW', 'Guinea-bissau'], ['GY', 'Guyana'], ['HT', 'Haiti'], ['HN', 'Honduras'], ['HK', 'Hong Kong'], ['HU', 'Hungary'], ['IS', 'Iceland'], ['IN', 'India'], ['ID', 'Indonesia'], ['IR', 'Iran'], ['IQ', 'Iraq'], ['IE', 'Ireland'], ['IL', 'Israel'], ['IT', 'Italy'], ['JM', 'Jamaica'], ['JP', 'Japan'], ['JO', 'Jordan'], ['KZ', 'Kazakhstan'], ['KE', 'Kenya'], ['KI', 'Kiribati'], ['KP', 'Korea (North)'], ['KR', 'Korea (South)'], ['KW', 'Kuwait'], ['KG', 'Kyrgyzstan'], ['LA', 'Laos'], ['LV', 'Latvia'], ['LB', 'Lebanon'], ['LS', 'Lesotho'], ['LR', 'Liberia'], ['LY', 'Libya'], ['LI', 'Liechtenstein'], ['LT', 'Lithuania'], ['LU', 'Luxembourg'], ['MO', 'Macau'], ['MK', 'Macedonia'], ['MG', 'Madagascar'], ['MW', 'Malawi'], ['MY', 'Malaysia'], ['MV', 'Maldives'], ['ML', 'Mali'], ['MT', 'Malta'], ['MH', 'Marshall Islands'], ['MQ', 'Martinique'], ['MR', 'Mauritania'], ['MU', 'Mauritius'], ['YT', 'Mayotte'], ['MX', 'Mexico'], ['FM', 'Micronesia'], ['MD', 'Moldova'], ['MC', 'Monaco'], ['MN', 'Mongolia'], ['MS', 'Montserrat'], ['MA', 'Morocco'], ['MZ', 'Mozambique'], ['MM', 'Myanmar'], ['NA', 'Namibia'], ['NR', 'Nauru'], ['NP', 'Nepal'], ['NL', 'Netherlands'], ['AN', 'Netherlands Antilles'], ['NC', 'New Caledonia'], ['NZ', 'New Zealand'], ['NI', 'Nicaragua'], ['NE', 'Niger'], ['NG', 'Nigeria'], ['NU', 'Niue'], ['NF', 'Norfolk Island'], ['MP', 'Northern Mariana Islands'], ['NO', 'Norway'], ['OM', 'Oman'], ['PK', 'Pakistan'], ['PW', 'Palau'], ['PA', 'Panama'], ['PG', 'Papua New Guinea'], ['PY', 'Paraguay'], ['PE', 'Peru'], ['PH', 'Philippines'], ['PN', 'Pitcairn'], ['PL', 'Poland'], ['PT', 'Portugal'], ['PR', 'Puerto Rico'], ['QA', 'Qatar'], ['RE', 'Reunion'], ['RO', 'Romania'], ['RU', 'Russian Federation'], ['RW', 'Rwanda'], ['KN', 'Saint Kitts And Nevis'], ['LC', 'Saint Lucia'], ['VC', 'St Vincent/Grenadines'], ['WS', 'Samoa'], ['SM', 'San Marino'], ['ST', 'Sao Tome'], ['SA', 'Saudi Arabia'], ['SN', 'Senegal'], ['SC', 'Seychelles'], ['SL', 'Sierra Leone'], ['SG', 'Singapore'], ['SK', 'Slovakia'], ['SI', 'Slovenia'], ['SB', 'Solomon Islands'], ['SO', 'Somalia'], ['ZA', 'South Africa'], ['ES', 'Spain'], ['LK', 'Sri Lanka'], ['SH', 'St. Helena'], ['PM', 'St.Pierre'], ['SD', 'Sudan'], ['SR', 'Suriname'], ['SZ', 'Swaziland'], ['SE', 'Sweden'], ['CH', 'Switzerland'], ['SY', 'Syrian Arab Republic'], ['TW', 'Taiwan'], ['TJ', 'Tajikistan'], ['TZ', 'Tanzania'], ['TH', 'Thailand'], ['TG', 'Togo'], ['TK', 'Tokelau'], ['TO', 'Tonga'], ['TT', 'Trinidad And Tobago'], ['TN', 'Tunisia'], ['TR', 'Turkey'], ['TM', 'Turkmenistan'], ['TV', 'Tuvalu'], ['UG', 'Uganda'], ['UA', 'Ukraine'], ['AE', 'United Arab Emirates'], ['UK', 'United Kingdom'], ['US', 'United States'], ['UY', 'Uruguay'], ['UZ', 'Uzbekistan'], ['VU', 'Vanuatu'], ['VA', 'Vatican City State'], ['VE', 'Venezuela'], ['VN', 'Viet Nam'], ['VG', 'Virgin Islands (British)'], ['VI', 'Virgin Islands (U.S.)'], ['EH', 'Western Sahara'], ['YE', 'Yemen'], ['YU', 'Yugoslavia'], ['ZR', 'Zaire'], ['ZM', 'Zambia'], ['ZW', 'Zimbabwe'] ]) residency = models.StringField( choices=[['AF', 'Afghanistan'], ['AL', 'Albania'], ['DZ', 'Algeria'], ['AS', 'American Samoa'], ['AD', 'Andorra'], ['AO', 'Angola'], ['AI', 'Anguilla'], ['AQ', 'Antarctica'], ['AG', 'Antigua And Barbuda'], ['AR', 'Argentina'], ['AM', 'Armenia'], ['AW', 'Aruba'], ['AU', 'Australia'], ['AT', 'Austria'], ['AZ', 'Azerbaijan'], ['BS', 'Bahamas'], ['BH', 'Bahrain'], ['BD', 'Bangladesh'], ['BB', 'Barbados'], ['BY', 'Belarus'], ['BE', 'Belgium'], ['BZ', 'Belize'], ['BJ', 'Benin'], ['BM', 'Bermuda'], ['BT', 'Bhutan'], ['BO', 'Bolivia'], ['BA', 'Bosnia And Herzegowina'], ['BW', 'Botswana'], ['BV', 'Bouvet Island'], ['BR', 'Brazil'], ['BN', 'Brunei Darussalam'], ['BG', 'Bulgaria'], ['BF', 'Burkina Faso'], ['BI', 'Burundi'], ['KH', 'Cambodia'], ['CM', 'Cameroon'], ['CA', 'Canada'], ['CV', 'Cape Verde'], ['KY', 'Cayman Islands'], ['CF', 'Central African Rep'], ['TD', 'Chad'], ['CL', 'Chile'], ['CN', 'China'], ['CX', 'Christmas Island'], ['CC', 'Cocos Islands'], ['CO', 'Colombia'], ['KM', 'Comoros'], ['CG', 'Congo'], ['CK', 'Cook Islands'], ['CR', 'Costa Rica'], ['CI', 'Cote D`ivoire'], ['HR', 'Croatia'], ['CU', 'Cuba'], ['CY', 'Cyprus'], ['CZ', 'Czech Republic'], ['DK', 'Denmark'], ['DJ', 'Djibouti'], ['DM', 'Dominica'], ['DO', 'Dominican Republic'], ['TP', 'East Timor'], ['EC', 'Ecuador'], ['EG', 'Egypt'], ['SV', 'El Salvador'], ['GQ', 'Equatorial Guinea'], ['ER', 'Eritrea'], ['EE', 'Estonia'], ['ET', 'Ethiopia'], ['FK', 'Falkland Islands (Malvinas)'], ['FO', 'Faroe Islands'], ['FJ', 'Fiji'], ['FI', 'Finland'], ['FR', 'France'], ['GF', 'French Guiana'], ['PF', 'French Polynesia'], ['TF', 'French S. Territories'], ['GA', 'Gabon'], ['GM', 'Gambia'], ['GE', 'Georgia'], ['DE', 'Germany'], ['GH', 'Ghana'], ['GI', 'Gibraltar'], ['GR', 'Greece'], ['GL', 'Greenland'], ['GD', 'Grenada'], ['GP', 'Guadeloupe'], ['GU', 'Guam'], ['GT', 'Guatemala'], ['GN', 'Guinea'], ['GW', 'Guinea-bissau'], ['GY', 'Guyana'], ['HT', 'Haiti'], ['HN', 'Honduras'], ['HK', 'Hong Kong'], ['HU', 'Hungary'], ['IS', 'Iceland'], ['IN', 'India'], ['ID', 'Indonesia'], ['IR', 'Iran'], ['IQ', 'Iraq'], ['IE', 'Ireland'], ['IL', 'Israel'], ['IT', 'Italy'], ['JM', 'Jamaica'], ['JP', 'Japan'], ['JO', 'Jordan'], ['KZ', 'Kazakhstan'], ['KE', 'Kenya'], ['KI', 'Kiribati'], ['KP', 'Korea (North)'], ['KR', 'Korea (South)'], ['KW', 'Kuwait'], ['KG', 'Kyrgyzstan'], ['LA', 'Laos'], ['LV', 'Latvia'], ['LB', 'Lebanon'], ['LS', 'Lesotho'], ['LR', 'Liberia'], ['LY', 'Libya'], ['LI', 'Liechtenstein'], ['LT', 'Lithuania'], ['LU', 'Luxembourg'], ['MO', 'Macau'], ['MK', 'Macedonia'], ['MG', 'Madagascar'], ['MW', 'Malawi'], ['MY', 'Malaysia'], ['MV', 'Maldives'], ['ML', 'Mali'], ['MT', 'Malta'], ['MH', 'Marshall Islands'], ['MQ', 'Martinique'], ['MR', 'Mauritania'], ['MU', 'Mauritius'], ['YT', 'Mayotte'], ['MX', 'Mexico'], ['FM', 'Micronesia'], ['MD', 'Moldova'], ['MC', 'Monaco'], ['MN', 'Mongolia'], ['MS', 'Montserrat'], ['MA', 'Morocco'], ['MZ', 'Mozambique'], ['MM', 'Myanmar'], ['NA', 'Namibia'], ['NR', 'Nauru'], ['NP', 'Nepal'], ['NL', 'Netherlands'], ['AN', 'Netherlands Antilles'], ['NC', 'New Caledonia'], ['NZ', 'New Zealand'], ['NI', 'Nicaragua'], ['NE', 'Niger'], ['NG', 'Nigeria'], ['NU', 'Niue'], ['NF', 'Norfolk Island'], ['MP', 'Northern Mariana Islands'], ['NO', 'Norway'], ['OM', 'Oman'], ['PK', 'Pakistan'], ['PW', 'Palau'], ['PA', 'Panama'], ['PG', 'Papua New Guinea'], ['PY', 'Paraguay'], ['PE', 'Peru'], ['PH', 'Philippines'], ['PN', 'Pitcairn'], ['PL', 'Poland'], ['PT', 'Portugal'], ['PR', 'Puerto Rico'], ['QA', 'Qatar'], ['RE', 'Reunion'], ['RO', 'Romania'], ['RU', 'Russian Federation'], ['RW', 'Rwanda'], ['KN', 'Saint Kitts And Nevis'], ['LC', 'Saint Lucia'], ['VC', 'St Vincent/Grenadines'], ['WS', 'Samoa'], ['SM', 'San Marino'], ['ST', 'Sao Tome'], ['SA', 'Saudi Arabia'], ['SN', 'Senegal'], ['SC', 'Seychelles'], ['SL', 'Sierra Leone'], ['SG', 'Singapore'], ['SK', 'Slovakia'], ['SI', 'Slovenia'], ['SB', 'Solomon Islands'], ['SO', 'Somalia'], ['ZA', 'South Africa'], ['ES', 'Spain'], ['LK', 'Sri Lanka'], ['SH', 'St. Helena'], ['PM', 'St.Pierre'], ['SD', 'Sudan'], ['SR', 'Suriname'], ['SZ', 'Swaziland'], ['SE', 'Sweden'], ['CH', 'Switzerland'], ['SY', 'Syrian Arab Republic'], ['TW', 'Taiwan'], ['TJ', 'Tajikistan'], ['TZ', 'Tanzania'], ['TH', 'Thailand'], ['TG', 'Togo'], ['TK', 'Tokelau'], ['TO', 'Tonga'], ['TT', 'Trinidad And Tobago'], ['TN', 'Tunisia'], ['TR', 'Turkey'], ['TM', 'Turkmenistan'], ['TV', 'Tuvalu'], ['UG', 'Uganda'], ['UA', 'Ukraine'], ['AE', 'United Arab Emirates'], ['UK', 'United Kingdom'], ['US', 'United States'], ['UY', 'Uruguay'], ['UZ', 'Uzbekistan'], ['VU', 'Vanuatu'], ['VA', 'Vatican City State'], ['VE', 'Venezuela'], ['VN', 'Viet Nam'], ['VG', 'Virgin Islands (British)'], ['VI', 'Virgin Islands (U.S.)'], ['EH', 'Western Sahara'], ['YE', 'Yemen'], ['YU', 'Yugoslavia'], ['ZR', 'Zaire'], ['ZM', 'Zambia'], ['ZW', 'Zimbabwe'] ]) ethnicity = models.StringField( choices=[['White', 'White'], ['Hispanic', 'Hispanic or Latino'], ['Black', 'Black or African American'], ['Asian', 'Asian'], ['Indian American', 'American Indian or Alaska native'], ['Middle Easter', 'Middle Easter or North African'], ['Pacific Islander', 'Native Hawaiian or other Pacific Islander'], ['Other', 'Some other race or ethnicity'], ] ) education = models.IntegerField( choices=[ [1, 'some secondary education (high school)'], [2, 'completed secondary education (graduated high school)'], [3, 'trade/technical/vocational training'], [4, 'some undergraduate education (college or university)'], [5, 'completed undergraduate education'], [6, 'some postgraduate education'], [7, 'completed postgraduate education (masters or doctorate)'], ] ) Worry = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Nervous = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Relax = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Talkative = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Sociable = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Reserved = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Original = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Artistic = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Active_imagination = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Rude = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Forgiving = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Considerate = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Thorough_job = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Lazy = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) Efficient = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7], ) # here make risk aversion questions based on Holt and Laury (2002). risk10 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk20 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk30 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk40 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk50 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk60 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk70 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk80 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk90 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) risk100 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[1, 'A'], [2, 'B']]) def player_risk(self): self.participant.vars['risk10'] = self.risk10 self.participant.vars['risk20'] = self.risk20 self.participant.vars['risk30'] = self.risk30 self.participant.vars['risk40'] = self.risk40 self.participant.vars['risk50'] = self.risk50 self.participant.vars['risk60'] = self.risk60 self.participant.vars['risk70'] = self.risk70 self.participant.vars['risk80'] = self.risk80 self.participant.vars['risk90'] = self.risk90 self.participant.vars['risk100'] = self.risk100 risk_payoff = models.DecimalField(decimal_places=2, max_digits=5) Neuroticism = models.DecimalField(decimal_places=2, max_digits=5) Extraversion = models.DecimalField(decimal_places=2, max_digits=5) Openness = models.DecimalField(decimal_places=2, max_digits=5) Agreeableness = models.DecimalField(decimal_places=2, max_digits=5) Conscientiousness = models.DecimalField(decimal_places=2, max_digits=5) def player_info(self): self.player_Worry = self.Worry self.player_Nervous = self.Nervous self.player_Relax = self.Relax self.player_Talkative = self.Talkative self.player_Sociable = self.Sociable self.player_Reserved = self.Reserved self.player_Original = self.Original self.player_Artistic = self.Artistic self.player_Active_imagination = self.Active_imagination self.player_Rude = self.Rude self.player_Forgiving = self.Forgiving self.player_Considerate = self.Considerate self.player_Thorough_job = self.Thorough_job self.player_Lazy = self.Lazy self.player_Efficient = self.Efficient def set_risk_payoff(self): if Constants.paying_round == 1 and self.risk10 == 1: self.risk_payoff = 0.1 * 2 + 0.9 * 1.6 elif Constants.paying_round == 1 and self.risk10 == 2: self.risk_payoff = 0.1 * 3.85 + 0.9 * 0.1 elif Constants.paying_round == 2 and self.risk20 == 1: self.risk_payoff = 0.2 * 2 + 0.8 * 1.6 elif Constants.paying_round == 2 and self.risk20 == 2: self.risk_payoff = 0.2 * 3.85 + 0.8 * 0.1 elif Constants.paying_round == 3 and self.risk30 == 1: self.risk_payoff = 0.3 * 2 + 0.7 * 1.6 elif Constants.paying_round == 3 and self.risk30 == 2: self.risk_payoff = 0.3 * 3.85 + 0.7 * 0.1 elif Constants.paying_round == 4 and self.risk40 == 1: self.risk_payoff = 0.4 * 2 + 0.6 * 1.6 elif Constants.paying_round == 4 and self.risk40 == 2: self.risk_payoff = 0.4 * 3.85 + 0.6 * 0.1 elif Constants.paying_round == 5 and self.risk50 == 1: self.risk_payoff = 0.5 * 2 + 0.5 * 1.6 elif Constants.paying_round == 5 and self.risk50 == 2: self.risk_payoff = 0.5 * 3.85 + 0.5 * 0.1 elif Constants.paying_round == 6 and self.risk60 == 1: self.risk_payoff = 0.6 * 2 + 0.4 * 1.6 elif Constants.paying_round == 6 and self.risk60 == 2: self.risk_payoff = 0.6 * 3.85 + 0.4 * 0.1 elif Constants.paying_round == 7 and self.risk70 == 1: self.risk_payoff = 0.7 * 2 + 0.3 * 1.6 elif Constants.paying_round == 7 and self.risk70 == 2: self.risk_payoff = 0.7 * 3.85 + 0.3 * 0.1 elif Constants.paying_round == 8 and self.risk80 == 1: self.risk_payoff = 0.8 * 2 + 0.2 * 1.6 elif Constants.paying_round == 8 and self.risk80 == 2: self.risk_payoff = 0.8 * 3.85 + 0.2 * 0.1 elif Constants.paying_round == 9 and self.risk90 == 1: self.risk_payoff = 0.9 * 2 + 0.1 * 1.6 elif Constants.paying_round == 9 and self.risk90 == 2: self.risk_payoff = 0.9 * 3.85 + 0.1 * 0.1 elif Constants.paying_round == 10 and self.risk100 == 1: self.risk_payoff = 2 else: self.risk_payoff = 3.85 ''' # Die Ausprägungen auf der 7er-Likert-Skala wurden ungewichtet addiert, wobei die Skalen gedrehter (negativ in # positiv) Items umkodiert wurden (1=7, 2=6, 3=5, 5=3, 6=2, 7=1) def set_Neuroticism(self): self.Neuroticism = (self.Worry + self.Nervous + Decimal(repr(abs(8 - self.Relax)))) def set_Extraversion(self): self.Extraversion = (self.Talkative + self.Sociable + abs(8 - self.Reserved)) def set_Openness(self): self.Openness = (self.Original + self.Artistic + self.Active_imagination) def set_Agreeableness(self): self.Agreeableness = (self.Forgiving + self.Considerate + abs(8 - self.Rude)) def set_Conscientiousness(self): self.Conscientiousness = (self.Thorough_job + self.Efficient + abs(8 - self.Lazy)) def other_player(self): return self.get_others_in_group()[0]'''