from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) class Constants(BaseConstants): name_in_url = 'final_survey_multitasking' players_per_group = None num_rounds = 1 def choices(): choice00000 = (4, 2, 6) return choice00000 def percentage(): percentage00000 = (0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100) return percentage00000 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): lottery_payoff = models.FloatField() lottery = models.FloatField() lottery1 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[0]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[10]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery2 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[1]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[9]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery3 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[2]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[8]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery4 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[3]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[7]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery5 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[4]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[6]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery6 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[5]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[5]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery7 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[6]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[4]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery8 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[7]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[3]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery9 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[8]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[2]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery10 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[9]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[1]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) lottery11 = models.StringField( choices=[ [str(choices()[0]), '\N{euro sign}' + str(choices()[0]) + ' for sure'], [str(choices()[1]), str(percentage()[10]) + '% probability of receiving \N{euro sign}' + str(choices()[2]) + ' and ' + str(percentage()[0]) + '% probability of receiving \N{euro sign}' + str(choices()[1])], ], label="", widget=widgets.RadioSelectHorizontal ) sex = models.IntegerField( choices=[ [1, 'Female'], [2, 'Male'], [3, 'Other'], ] ) age = models.StringField( choices=['16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', 'Else or prefer not to say'], ) program_language = models.IntegerField( choices=[ [1, 'Dutch'], [2, 'English'], [3, 'Other'], ] ) first_language = models.IntegerField( choices=[ [1, 'Dutch'], [2, 'English'], [3, 'Other'], ] ) education_level = models.IntegerField( choices=[ [1, 'Undergraduate degree (BA/BSc/other)'], [2, 'Graduate degree (MA/MSc/MPhil/other)'], [3, 'Doctorate degree (PhD/other)'], [4, 'Other'], ] ) nonogram_before = models.IntegerField( choices=[ [1, 'I play this game fairly often. '], [2, 'I have played this game before.'], [3, 'I have never played this game before.'], ] ) others_before = models.IntegerField( choices=[ [1, 'I play puzzle games fairly often. '], [2, 'I have played puzzle games before.'], [3, 'I have never played puzzle games before.'], ] ) nationality = models.StringField( choices=['Afghan', 'Albanian', 'Algerian', 'American', 'Andorran', 'Angolan', 'Anguillan', 'Argentine', 'Armenian', 'Australian', 'Austrian', 'Azerbaijani', 'Bahamian', 'Bahraini', 'Bangladeshi', 'Barbadian', 'Belarusian', 'Belgian', 'Belizean', 'Beninese', 'Bermudian', 'Bhutanese', 'Bolivian', 'Botswanan', 'Brazilian', 'British', 'British Virgin Islander', 'Bruneian', 'Bulgarian', 'Burkinan', 'Burmese', 'Burundian', 'Cambodian', 'Cameroonian', 'Canadian', 'Cape Verdean', 'Cayman Islander', 'Central African', 'Chadian', 'Chilean', 'Chinese', 'Citizen of Antigua and Barbuda', 'Citizen of Bosnia and Herzegovina', 'Citizen of Guinea-Bissau', 'Citizen of Kiribati', 'Citizen of Seychelles', 'Citizen of the Dominican Republic', 'Citizen of Vanuatu ', 'Colombian', 'Comoran', 'Congolese (Congo)', 'Congolese (DRC)', 'Cook Islander', 'Costa Rican', 'Croatian', 'Cuban', 'Cymraes', 'Cymro', 'Cypriot', 'Czech', 'Danish', 'Djiboutian', 'Dominican', 'Dutch', 'East Timorese', 'Ecuadorean', 'Egyptian', 'Emirati', 'English', 'Equatorial Guinean', 'Eritrean', 'Estonian', 'Ethiopian', 'Faroese', 'Fijian', 'Filipino', 'Finnish', 'French', 'Gabonese', 'Gambian', 'Georgian', 'German', 'Ghanaian', 'Gibraltarian', 'Greek', 'Greenlandic', 'Grenadian','Guamanian', 'Guatemalan', 'Guinean', 'Guyanese', 'Haitian', 'Honduran', 'Hungarian', 'Icelandic', 'Indian', 'Indonesian', 'Iranian', 'Iraqi', 'Irish', 'Israeli', 'Italian', 'Ivorian', 'Jamaican', 'Japanese', 'Jordanian', 'Kazakh', 'Kenyan', 'Kittitian', 'Kosovan', 'Kuwaiti', 'Kyrgyz', 'Lao', 'Latvian', 'Lebanese', 'Liberian', 'Libyan', 'Liechtenstein citizen', 'Lithuanian', 'Luxembourger', 'Macanese', 'Macedonian', 'Malagasy', 'Malawian', 'Malaysian', 'Maldivian', 'Malian', 'Maltese', 'Marshallese', 'Martiniquais', 'Mauritanian', 'Mauritian', 'Mexican', 'Micronesian', 'Moldovan', 'Monegasque', 'Mongolian', 'Montenegrin', 'Montserratian', 'Moroccan', 'Mosotho', 'Mozambican', 'Namibian', 'Nauruan', 'Nepalese', 'New Zealander', 'Nicaraguan', 'Nigerian', 'Nigerien', 'Niuean', 'North Korean', 'Northern Irish', 'Norwegian', 'Omani', 'Pakistani', 'Palauan', 'Palestinian', 'Panamanian', 'Papua New Guinean', 'Paraguayan', 'Peruvian', 'Pitcairn Islander', 'Polish', 'Portuguese', 'Prydeinig', 'Puerto Rican', 'Qatari', 'Romanian', 'Russian', 'Rwandan', 'Salvadorean', 'Sammarinese', 'Samoan', 'Sao Tomean', 'Saudi Arabian', 'Scottish', 'Senegalese', 'Serbian', 'Sierra Leonean', 'Singaporean', 'Slovak', 'Slovenian', 'Solomon Islander', 'Somali', 'South African', 'South Korean', 'South Sudanese', 'Spanish', 'Sri Lankan', 'St Helenian', 'St Lucian', 'Stateless', 'Sudanese', 'Surinamese', 'Swazi', 'Swedish', 'Swiss', 'Syrian', 'Tajik', 'Tanzanian', 'Thai', 'Togolese', 'Tongan', 'Trinidadian', 'Tristanian', 'Tunisian', 'Turkish', 'Turkmen', 'Turks and Caicos Islander', 'Tuvaluan', 'Ugandan', 'Ukrainian', 'Uruguayan', 'Uzbek', 'Vatican citizen', 'Venezuelan', 'Vietnamese', 'Vincentian', 'Wallisian', 'Welsh', 'Yemeni', 'Zambian', 'Zimbabwean', 'Prefer not to say'] )