← Questions

Simulate particles from a point source hitting a screen

0
OpenAICodingLast asked Feb 2026

A point source sits some distance in front of an infinitely tall vertical screen and fires particles toward it. Each particle leaves at a random angle drawn uniformly between -π/2 and π/2, so every particle reaches the screen. Model the setup in code, simulate many particles, and report where they land on the screen. Be ready to explain what the distribution of hit positions looks like and why.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding