Solve three algorithmic tasks in Python | DRW