data point: I started learning Python/Django 4 months ago (after a 20 year break from programmiung). Took me 40 minutes to solve. I'm not yet fluent with syntax so I had to look up (and still managed to mangle list processing syntax and was slow to interpret error messages related to accidentally swapping my variables for size of triangle and the list. My logic was fine once I got got the syntax down and swaps corrected. So your test would have caused me to be weeded out, I guess.
Had you asked me to pseudo code it I could have done it in less than 10 minutes.
Note, however, that learning web development requires learning many different pieces in addition to Python, so I simply haven't had the time to thoroughly learn all the syntax of any given piece.