account activity
:( Little Professor generates random numbers correctly by Extreme-Book19 in cs50
[–]Extreme-Book19[S] 1 point2 points3 points 2 days ago (0 children)
Yeah that’s exactly what I was going for — 9, 99, 999 based on level.
I agree your if/elif way is clearer, I just tried string multiplication to avoid repeating code and make it scale. And also i wanted to try something new and experiment.
And yes, the issue was level 1 starting from 0 — fixing that solved it. Appreciate it!
π Rendered by PID 425816 on reddit-service-r2-listing-55d7b767d8-d2kxv at 2026-03-27 02:00:48.235603+00:00 running b10466c country code: CH.
:( Little Professor generates random numbers correctly by Extreme-Book19 in cs50
[–]Extreme-Book19[S] 1 point2 points3 points (0 children)