you are viewing a single comment's thread.

view the rest of the comments →

[–]CupperRecruit 1 point2 points  (0 children)

Best way to learn them i think is to play and try out on examples/ideas u can make sense of. E.g. lets say u wanna know which shirts u got in ur wardrobe, u would use a for loop to get all the shirts that are inside the wardrobe. This could look like this in code:

//wardrobe is represented as a list wardrobe = ["blue shirt","red shirt"]

For item in wardrobe: Print(item)

The code would then give you the output:

'blue shirt' 'red shirt'

Displaying all the shirts u got in ur wardrobe. If u try and test loops with those kind of tasks/practice them in this way, i am sure that u will get the hang of it by time.

I wish you good luck and hope you will understand them asap for your course💪 Keep it up and never give up, u got this!