Information for Teachers#

The TigerPython Dialect#

TigerJython / TigerPython is a Dialect of Python with a few didactic changes. In WebTigerJython, the whole feature set of Python can be used with a few additional didactic features.

These features can be turned off in settings under “Advanced Features” if you enable “Vanilla Python”

The repeat loop#

In WebTigerJython, the repeat loop additionally exists, so loops can be introduced without undestanding the concept of variables. The repeat loop can be used with and without a parameter.

repeat 4:
    # do something

is equivalent to

for _ in range(int(4)):
    # do something

and

repeat:
    # do something

is equivalent to

while True:
    # do something

The input functions#

The input function in TigerJython automatically tries to cast inputs as their corresponding data types. So if you input a Number, it is automatically cast as Integer or Float if possible. Otherwise, it will be cast as a string.

Additionally you can use inputInt, inputFloat, askYesNo to cast the input Value as specified.

Additional List accessors#

Lists do have the additional field first and last and they function as aliases to first / last position. They can be used as getters and setters.

list.first is equivalent to list[0] and list.last is equivalent to list[-1]

Example:

l = [1,2,3,4]

l.first = 10
print(l.last) # Will print 4

print(l) # will print [10, 2, 3, 4]

Additional Type checkers exist#

  • isInteger

  • isFloat

  • isString

  • isBoolean

  • isList

  • isDictionary

Each of them is equivalent to isinstance(value, type) called with the corresponding type.

Additional Functions#

  • The function sqrt (square root) can be used without being imported from math

Teaching Material#

Books#

Websites#

Classroom Management Tools with integrated TigerPython#

Exams#

WebTigerPython can be used in Safe Exam Browser

To use WebTigerPython in the Safe Exam Browser, you have to whitelist the following two links: https://webtigerpython.ethz.ch/* https://cdn.jsdelivr.net/pyodide/*

iPad issues#

WebTigerPython does work on iPad in the SEB, however some features are unfortunately blocked such as. (This Problem does not occur on regular usage on iPad)

  • Turtle

  • input functionality

If you want exam these features, we encourage using WebTigerJython, the predecessor of WebTigerPython.