from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random r_num = random.randint(1,3) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'my_sinniti_survey' players_per_group = 2 num_rounds = r_num class Subsession(BaseSubsession): def creating_session(self): print('in creating session') class Group(BaseGroup): num_producyion1 = models.IntegerField(label='生産量の合計') price1 = models.IntegerField(label='決定した価格') class Player(BasePlayer): production1 = models.IntegerField() benefit1 = models.IntegerField()