Skip to content

aseyq/imprs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python and oTree Crash Course

IMPRS BeSmart Summer School

Binder

Day 1 - Monday, 7th August 2023

Session Course Subject Slides
I Python Intoduction, Variables, Types link
II Python Lists, Logicals, Conditionals, Dictionaries link
III Python Classes link
IV Python Modules, Packages, Ecosystem link

Day 2 - Tuesday, 8th August 2023

Session Course Subject Slides
V oTree Introduction, Structure, Individual Experiments link
VI cont'd
VII oTree Group Experiments, Homogenous Groups link
VIII cont'd

Day 3 - Wednesday, 9th August 2023

Session Course Subject Slides
IX oTree Heterogeneous Groups link
IX oTree Matching, Apps link
X oTree Advanced Pages and Templates HTML JS link
X oTree Simultaneous Games, Live Method link
XI oTree Deploying Demo
XII oTree Online Experiments: Challenges and Tips link

Assignment for Day 3

Take the Public Goods Game we used. Do the following:

  1. Set the number of rounds to 3

  2. Add a Welcome page and add some welcome messages to it. Make it visible only on the first page (hint: look at the documentation for is_displayed)

  3. Show the contributions of other players in the group (including or excluding myself) Hint:

  • Path 1: You can create a list of contributions and input it into the template. Then you need to check vars_for_template in the documentation.

  • Path 2: You can loop over the players in the group in the template. Check {{ for p in group.get_players }} in the documentation. This is the template version of group.get_players().

oTree Documentation: https://otree.readthedocs.io/en/latest/

Requirements on your machine

About

Python + oTree course materials for IMPRS Be Smart Summer School

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published