python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
if condition doesn't work but else condition works
When I run the following code in a python console, it works as expected. However, when I run it in oree, only the else condition is taken into consideration. So even if the conditions are fulfilled, I...
princesskaguya666
Votes: 0
Answers: 1
I have an if-else statement with over 100 "elses". Any ideas on how to condense this?
I've coded a game in oTree for research purposes and the code below does exactly what I intend. The problem is that some games have over 100 rounds so you can see how the code could get ridiculously l...
Cameron Kormylo
Votes: 0
Answers: 3
How do you pass a variable from javascript to python (oTree) or django?
I have some created some variables in Javascript to tracker how long an individual holds a button. I would like to pass these variables within a class in python (oTree) to store the data.
So, suppose ...
princesskaguya666
Votes: 0
Answers: 1
Distribution of users onto sessions according to specific rule
for a simple app I try to develop a function that distributes player to different sessions (or treatments). For that purpose, I use a in built "creating_session" function.
At first, every se...
Nicki Maier
Votes: 0
Answers: 1