Do you know the offside rule? Sure? To have some fun, I’m writing a quiz using Python’s turtle

This is what it looks like so far (and no, I’m not bothering with fancy graphics – life’s too short)

In this video:

• you can see direction in which team is attacking from the arrows
• each snapshot shows when player with the ball kicks the ball forward
• program (hopefully) detects whether it’s offside or not
• there are 15 (random) scenarios in this video

Still to do:

• deal with when forward player is in own half (no offside)
• deal with when forward player is the one with the ball (no offside)
• turn into a quiz
• write article for The Python Coding Book blog about it to document the code - there are some interesting aspects I’m using in the code that hopefully some will find useful.

QOTO: Question Others to Teach Ourselves