Author Topic: Day 5 - Python Loops  (Read 1691 times)

TheBreh

  • Administrator
  • Newbie
  • *****
  • Posts: 31
    • View Profile
Day 5 - Python Loops
« on: November 14, 2021, 05:17:37 pm »
Discuss here.

Share on Facebook Share on Twitter


Secure Da Bag

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Day 5 - Python Loops
« Reply #1 on: November 26, 2021, 12:15:05 pm »
For each loop
Spoiler (hover to show)

Challenge
Spoiler (hover to show)

Challenge
Spoiler (hover to show)

For loop with range
Spoiler (hover to show)

Challenge
Spoiler (hover to show)

Challenge
Spoiler (hover to show)

Project
Spoiler (hover to show)

Secure Da Bag

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Day 5 - Python Loops
« Reply #2 on: November 26, 2021, 12:23:51 pm »
Day 5 Project is the 1st project that had me sweating. And I was pissed when I saw the solution.

Obreh Winfrey

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Day 5 - Python Loops
« Reply #3 on: November 28, 2021, 09:17:41 pm »
Python makes it easy to loop over lists, but sometimes you need a traditional C-style for loop that let's you use the iteration of the loop. I did some file operations in a script where I needed to use the index to know where to markup a file. This link is a helpful tutorial: https://treyhunner.com/2016/04/how-to-loop-with-indexes-in-python/

KingZimbabww

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Day 5 - Python Loops
« Reply #4 on: November 30, 2021, 04:30:20 am »
Wow she's legit tripping with this day 5 project

Been stuck on this for like 2 hours

raul04

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Day 5 - Python Loops
« Reply #5 on: November 30, 2021, 04:14:27 pm »
Yeah about to do this lesson tonight after work shall see what happens.

Secure Da Bag

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Day 5 - Python Loops
« Reply #6 on: December 01, 2021, 05:49:45 pm »
Wow she's legit tripping with this day 5 project

Been stuck on this for like 2 hours

Trying to make the character random. Had me like WTF for a good minute.