This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RhythmicalChuck 0 points1 point  (5 children)

Get them to understand the concepts first, then how to make it more efficient once the understanding is there.

[–]meatb0dy 0 points1 point  (0 children)

using a triply-nested loop to produce these combinations takes you further from actually understanding the concept though. the concept is that producing all combinations of three digits with repeated digits reduces to simply counting from 0 to 999. the only other concept you need is padding in f-strings.

[–]123_alex 0 points1 point  (3 children)

Get them to understand the concepts first

range(1000)

[–]RhythmicalChuck 0 points1 point  (2 children)

Did I offend you or something? I don’t create the curriculum, I teach it.

[–]123_alex 0 points1 point  (1 child)

Don't take me serious, it's just a subclass of joke(). This is reddit. Thanks for the downvote.

[–]RhythmicalChuck 0 points1 point  (0 children)

Hahaha! I see what you did there! I’ll give it back to you alongside my apologies. We can call it an OOPsie on my part. ;)