Odd Ticket

Pick up a Python ticket.

Work through an example, write your solution, and check it in your browser.

Start Python ticket No account needed

Python dictionaries

Parcel Loads

Find the first pair of parcels that reaches a target weight.

Weights
[10, 4, 4, 7]
Target
11
Indices
[1, 3]

Find the missing weight

Subtract each new parcel’s weight from the target. Use a dictionary to remember the first index for each weight you’ve seen.

Show the worked example

11 − 7 = 4

The parcel at index 3 weighs 7, so it needs a 4. Two earlier parcels weigh 4. Use the first one, at index 1, and return [1, 3].

Mini-games

Why play?

A break you get to choose

In a diary study of 95 workers, people reported better recovery when they spent breaks doing something they preferred. That’s why you can choose your ticket, take a hint, switch activities, or stop whenever you like. Read the break study.

What shaped the activities

A small experiment with students found that coloring a structured pattern on paper eased short-term anxiety after a stressful prompt. It inspired us to give you the outlines and leave the colors to you. Read the coloring study.

Findings on short puzzle-game breaks have been mixed. Path and word tickets are here for people who like a small puzzle. The typing passages are original scenes you can linger over. The effects of playing Odd Ticket haven’t been studied. Read the games study.

Privacy & play

XP, stamps and pictures you choose to keep are saved in this browser. You can clear them in your ticket book. Other drawings, path moves, guesses and typing stay in the open tab. Your browser contacts our hosting service to load the site.