from otree.api import * c = cu doc = '' class C(BaseConstants): # built-in constants NAME_IN_URL = 'Segunda_Parte' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): pass class Instrucciones_Final_PrimeraParte(Page): form_model = 'player' @staticmethod def is_displayed(player: Player): return True @staticmethod def before_next_page(player: Player, timeout_happened): participant = player.participant participant.Pago1 = int(participant.task_payment1 - participant.TX1- participant.sancion_r1) participant.Pago2 = int(participant.task_payment2 - participant.TX2- participant.sancion_r2) participant.Pago3 = int(participant.task_payment3 - participant.TX3- participant.sancion_r3) import random grupo2=(participant.Pago1, participant.Pago2, participant.Pago3) participant.Pago_total= random.choice(grupo2) page_sequence = [Instrucciones_Final_PrimeraParte]