<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kyle Leonard</title>
    <description>The latest articles on DEV Community by Kyle Leonard (@kdleonard93).</description>
    <link>https://dev.to/kdleonard93</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F882161%2F76ee761b-23da-4172-8036-3c07459a1760.jpeg</url>
      <title>DEV Community: Kyle Leonard</title>
      <link>https://dev.to/kdleonard93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kdleonard93"/>
    <language>en</language>
    <item>
      <title>Day 7: Hangman Game</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Wed, 31 Aug 2022 19:43:55 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-7-hangman-game-4d6</link>
      <guid>https://dev.to/kdleonard93/day-7-hangman-game-4d6</guid>
      <description>&lt;h2&gt;
  
  
  The Project
&lt;/h2&gt;

&lt;p&gt;Today's goal was to build out a hangman game and one thing I did really appreciate is how Angela broke down the build process into sections instead of having one intro video with just the objective. How she laid out the to-do's helped me get my mind around how certain things should work for generating the random name to where certain areas might need a loop to work properly. I think that helped reduce the time it would have taken to get this one done. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Flow Chart
&lt;/h2&gt;

&lt;p&gt;One thing that I am starting to appreciate is the flow charts and the need for them before starting the project. I would always dread having to make one and had the naive thought that it's not needed and I should be able to think through what needs to be done step by step without one. But let me tell ya, I was way wrong 😅. Once I got the hang of how to think through the build process with flow charts it became easier to actually start building the project.&lt;/p&gt;

&lt;p&gt;I've added my flow chart below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UCnU0SMl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1660932369182/YTGMlJ16Q.png%2520align%3D%2522left%2522" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UCnU0SMl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1660932369182/YTGMlJ16Q.png%2520align%3D%2522left%2522" alt="Screen Shot 2022-08-19 at 2.05.26 PM.png" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;This project really stretched my chops and as I mentioned in the intro, it was pretty satisfying. My solution is below:&lt;br&gt;
&lt;code&gt;main.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from multiprocessing.spawn import import_main_path
import random
from hangman_words import word_list
from hangman_art import logo, stages

chosen_word = random.choice(word_list)
word_length = len(chosen_word)

end_of_game = False
lives = 6

print(logo)

# Testing code
print(f'Pssst, the solution is {chosen_word}.')

# Create blanks
display = []
for _ in range(word_length):
    display += "_"

while not end_of_game:
    guess = input("Guess a letter: ").lower()

    if guess in display:
        print(f"Youve already guessed {guess}.")

    # Check guessed letter
    for position in range(word_length):
        letter Al = chosen_word[position]
        print(
            f"Current position: {position}\n Current letter: {letter}\n Guessed letter: {guess}")
        if letter == guess:
            display[position] = letter

    # Check if user is wrong.
    if guess not in chosen_word:
        print(
            f"You guessed {guess}. That letter is not in the word. Life lossed.")
        lives -= 1
        if lives == 0:
            end_of_game = True
            print("You lose.")

    # Join all the elements in the list and turn it into a String.
    print(f"{' '.join(display)}")

    # Check if user has got all letters.
    if "_" not in display:
        end_of_game = True
        print("You win.")
    print(stages[lives])

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you check my &lt;a href="https://github.com/kdleonard93/100-Days-of-Code-Day-7"&gt;github repo&lt;/a&gt;, you'll notice the imported files used for the art and random names but I didn't think I needed to add that here to save the space. Everything I worked on was from this file only. &lt;/p&gt;

&lt;h2&gt;
  
  
  EOD
&lt;/h2&gt;

&lt;p&gt;That wraps up today's work. I'm in ATL for the weekend so I'll most likely be splitting Day 8 up into 2 days. Luckily, that's something Angela mentioned in the summary video after the hangman project so I don't feel bad anymore for splitting up some longer days if needed 😁✌🏾&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to connect as peers, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>python</category>
      <category>webdev</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 6: Python Functions &amp; Karel</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Wed, 31 Aug 2022 19:39:48 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-6-python-functions-karel-3773</link>
      <guid>https://dev.to/kdleonard93/day-6-python-functions-karel-3773</guid>
      <description>&lt;h2&gt;
  
  
  Today's Lesson
&lt;/h2&gt;

&lt;p&gt;This article should be short and sweet. There weren't any assignments for this day so It didn't take me as long as the previous days.&lt;/p&gt;

&lt;p&gt;We pretty much just discussed functions and while loops as well as touched on the importance of indentation.&lt;/p&gt;

&lt;p&gt;While loops in Python are still a bit confusing for me so I won't go into detail or try to explain the concept like It clicked for me the first time through. For the day's project, we used &lt;a href="https://reeborg.ca/reeborg.html?lang=en&amp;amp;mode=python&amp;amp;menu=worlds%2Fmenus%2Freeborg_intro_en.json&amp;amp;name=Maze&amp;amp;url=worlds%2Ftutorial_en%2Fmaze1.json"&gt;Reeborg's World&lt;/a&gt; for the challenge. The objective was to lead him to the finish by using while loops and if statements. My solution is below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://reeborg.ca/reeborg.html?lang=en&amp;amp;mode=python&amp;amp;menu=worlds%2Fmenus%2Freeborg_intro_en.json&amp;amp;name=Maze&amp;amp;url=worlds%2Ftutorial_en%2Fmaze1.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  EOD
&lt;/h2&gt;

&lt;p&gt;Like I said, today was pretty short and sweet. I'll probably have to go over this lesson again or see if my other course can explain this concept in more detail for me.&lt;/p&gt;

&lt;p&gt;See ya tomorrow ✌🏾.&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to connect as peers, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>100daysofcode</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 5: Python Loops</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Wed, 31 Aug 2022 19:38:35 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-5-python-loops-fpl</link>
      <guid>https://dev.to/kdleonard93/day-5-python-loops-fpl</guid>
      <description>&lt;h2&gt;
  
  
  Today's Lesson
&lt;/h2&gt;

&lt;p&gt;So today was all about loops and the use of what we learned in the previous lessons. I found it to be a bit easier than I thought it was going to be. Maybe because I banged my head on my desk so much when learning for/forEach loop and its variations in JS, it just clicked this time around after coming back to it. The way you implement it in python is a bit more straightforward as well.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example of a &lt;code&gt;for()&lt;/code&gt; loop in JS:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let i = 0; i &amp;lt; 9; i++) {
  console.log(i);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;012345678
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  My hardships with learning this in JS
&lt;/h5&gt;

&lt;p&gt;The conditions in JS vs Python are what I believe were the key differences with me getting the python way of doing for loops. I will say it's a bit more condensed in JS but that's where I start to trip up once the logic and for loop gets more complicated; How you write the loop iteration was confusing for me at the start. Then once you get to situations where the initialization block and the conditional block are not added or needed, my brain starts to melt trying to figure out how to move forward. Usually results in me stuck with an infinite loop cause I never remembered how to properly break the loop in the body.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example of a &lt;code&gt;for()&lt;/code&gt; loop in Python:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers = [1, 2, 3]

for x in numbers:
  print(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
2
3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Python's straightforward approach
&lt;/h5&gt;

&lt;p&gt;As you can see, Python's (simple) version of a &lt;code&gt;for&lt;/code&gt; loop is somewhat different but all in all similar. The main difference is the loops syntax itself where you don't have to classify the variable (Python doesn't use the var/let/const syntax or anything similar). You also don't need to tell it how many times to run through the loops since indentation is key for the loops in Python. Any condition or statement within the for loop itself will be run in succession. When it comes to looping through a range of elements, its as simple as using the &lt;code&gt;range(start, finish)&lt;/code&gt; method.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 5: Password Generator
&lt;/h2&gt;

&lt;p&gt;This project was actually pretty cool considering the need for &lt;strong&gt;&lt;em&gt;VERY&lt;/em&gt;&lt;/strong&gt; strong passwords these days.&lt;br&gt;
Not much to explain about the function of the project (pretty obvious from the name 😄) and you can see my solution code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import random
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
           'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symbols = ['!', '#', '$', '%', '&amp;amp;', '(', ')', '*', '+']

print("Welcome to the PyPassword Generator!")
nr_letters = int(input("How many letters would you like in your password?\n"))
nr_symbols = int(input(f"How many symbols would you like?\n"))
nr_numbers = int(input(f"How many numbers would you like?\n"))

password = ""

for letter in range(1, nr_letters + 1):
    password += random.choice(letters)

for number in range(1, nr_numbers + 1):
    password += random.choice(numbers)

for symbol in range(1, nr_symbols + 1):
    password += random.choice(symbols)

strong_password = ''.join(random.sample(password, len(password)))

print(f"Your password is: {strong_password}")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My final solution was a bit different from the instructors' solution but the way I have it implemented is a bit cleaner and uses some methods that haven't been discussed yet (I didn't know them prior; Learned these methods as I was looking for ways to break the password up, shuffle it, and add it back together in a string.)&lt;/p&gt;

&lt;p&gt;If you are curious on the instructors solutions, I've added it below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import random
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symbols = ['!', '#', '$', '%', '&amp;amp;', '(', ')', '*', '+']

print("Welcome to the PyPassword Generator!")
nr_letters = int(input("How many letters would you like in your password?\n")) 
nr_symbols = int(input(f"How many symbols would you like?\n"))
nr_numbers = int(input(f"How many numbers would you like?\n"))

password_list = []

for char in range(1, nr_letters + 1):
  password_list.append(random.choice(letters))

for char in range(1, nr_symbols + 1):
  password_list += random.choice(symbols)

for char in range(1, nr_numbers + 1):
  password_list += random.choice(numbers)

print(password_list)
random.shuffle(password_list)
print(password_list)

password = ""
for char in password_list:
  password += char

print(f"Your password is: {password}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the instructor's solution had a few more steps but everything is still pretty clear with her version.&lt;/p&gt;

&lt;h2&gt;
  
  
  EOD
&lt;/h2&gt;

&lt;p&gt;That concludes day 5. All in all, I enjoyed today's lesson and feel like I was able to grasp loops a bit better in Python my first time around. For day 6, looks like we are getting into While Loos, Code Blocks, and Functions.&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to connect as peers, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 4: Randomization and Python Lists</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Tue, 16 Aug 2022 13:12:31 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-4-randomization-and-python-lists-24fl</link>
      <guid>https://dev.to/kdleonard93/day-4-randomization-and-python-lists-24fl</guid>
      <description>&lt;h2&gt;
  
  
  Today's Lesson
&lt;/h2&gt;

&lt;p&gt;I feel like Day 4 was a much need breather from day 3. The assignments and video lectures seem to click a bit more. The main takeaway was the use of the Random Module and Lists. &lt;/p&gt;

&lt;h4&gt;
  
  
  Random Module
&lt;/h4&gt;

&lt;p&gt;The random module is a built-in module to help you generate random elements. It was pretty straight forward and the assignments were better explained as well, making them quicker to work through.&lt;br&gt;
An example of that is the Heads or Tails assignment below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Remember to use the random module
#Hint: Remember to import the random module here at the top of the file. 🎲
import random
# 🚨 Don't change the code below 👇
test_seed = int(input("Create a seed number: "))
random.seed(test_seed)
 # 🚨 Don't change the code above 👆 It's only for testing your code.

#Write the rest of your code below this line 👇

random_int = random.randint(0, 1)

if random_int == 1:
    print("Heads")
else:
    print("Tails")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Lists
&lt;/h4&gt;

&lt;p&gt;Lists in Python are pretty much like Arrays in JS. We went over indexing, index errors, and nesting lists.&lt;br&gt;
The same thing goes with the Lists assignments as in they were clearly explained. &lt;br&gt;
Example assignment below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 🚨 Don't change the code below 👇
row1 = ["⬜️","⬜️","⬜️"]
row2 = ["⬜️","⬜️","⬜️"]
row3 = ["⬜️","⬜️","⬜️"]
map = [row1, row2, row3]
print(f"{row1}\n{row2}\n{row3}")
position = input("Where do you want to put the treasure?")
# 🚨 Don't change the code above 👆

#Write your code below this row 👇
horizontal = int(position[0])
vertical = int(position[1])


selected_row = (map[vertical - 1])
selected_row[horizontal - 1] = "X"

#Write your code above this row 👆

# 🚨 Don't change the code below 👇
print(f"{row1}\n{row2}\n{row3}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Day 4 Project - Rock Paper Scissors
&lt;/h2&gt;

&lt;p&gt;The Rock Paper Scissors game I feel was pretty easy to get done once you figure out the logic. Basically you start off with the user input ranging from 0-2 and then you get the computer input by using the random generator. After the inputs are stored and changed to integers, you just go through a bunch of if/elif statements to compare the values and see who won. My code can be found below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import random
rock = '''
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)
'''

paper = '''
    _______
---'   ____)____
          ______)
          _______)
         _______)
---.__________)
'''

scissors = '''
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
'''

# Write your code below this line 👇

user_choice = int(input(
    "What do you choose? Type 0 for Rock, 1 for Paper, 2 for Scissors:\n "))

computer_choice = random.randint(0, 2)
print(f"Computer chose {computer_choice}")

if user_choice == computer_choice:
    print("It's a tie!")
elif user_choice == 0 and computer_choice == 1:
    print("Computer wins!")
elif user_choice == 0 and computer_choice == 2:
    print("User wins!")
elif user_choice == 1 and computer_choice == 0:
    print("User wins!")
elif user_choice == 1 and computer_choice == 2:
    print("Computer wins!")
elif user_choice == 2 and computer_choice == 0:
    print("Computer wins!")
elif user_choice == 2 and computer_choice == 1:
    print("User wins!")
else:
    print("Invalid Input, loser")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  EOD
&lt;/h2&gt;

&lt;p&gt;I feel today was needed after going through a rough day 3 😅. I also know I said I was going to do day 4 AND day 5 but I needed to do some dog sitting for a bit and let's be honest, day 5 is going to be about loops and that always tripped me up in JS and I still don't have quite the handle on it lol. So I'll double back on that tomorrow.&lt;/p&gt;

&lt;p&gt;Goodnight folks ✌🏾&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to connect as peers, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 3: Conditional Statements, Logical Operators, Code Block and Scope</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Sun, 14 Aug 2022 05:18:34 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-3-conditional-statements-logical-operators-code-block-and-scope-4obh</link>
      <guid>https://dev.to/kdleonard93/day-3-conditional-statements-logical-operators-code-block-and-scope-4obh</guid>
      <description>&lt;h2&gt;
  
  
  My realization
&lt;/h2&gt;

&lt;p&gt;Okay folks, my ambition of doing two courses at the same time is just beyond exhausting. The issue that I have is that the 100 days of code course is much denser than the ZTM (Zero to Mastery) course; 100 days of code has 66 hours of material while the ZTM course only has 22 hours. So I see myself spending too much time thinking the ZTM course will have more concepts and explain things a bit more clearer but I've gained equal knowledge from both courses and they both have quality material. With that being said, this blog will now be focused on just the 100 days of code course. I still plan to go through the other course but now, at my own leisure. There is no point of me burning myself out after my workday of coding as well. &lt;/p&gt;

&lt;p&gt;Another thing that I will say is a bit frustrating is that the 100 days of code course claims that each day you shouldn't have to spend more than an hr - hr 1/2. Today's workload proved that to be inaccurate 😅. Here is a quick screenshot of the assignments that are sprinkled through the day's material before the "Project of the Day" -&amp;gt; &lt;a href="https://www.loom.com/i/70128563ae324f808339210518276bc4"&gt;https://www.loom.com/i/70128563ae324f808339210518276bc4&lt;/a&gt;. As you can see, there were two assingmets that took me a few attempts to get though. These assignments both had the "This is a Difficult Challenge" message before the instructions. There's no way someone new to Python will be able to get through the course material (which is literally an hr of video, already debunking the claim "Only 1 hour per day needed" ) + the assignments and then finally the project all in an hr - hr 1/2. However, the course material is still really good and I'm learning a lot, just a little salty that I planned my journey on only needing to spend a max of an hr and a half to 2 hours per day on these which is not the case for me (yet). But I digress 😏.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning how Control Flow and Logical Operators work in Python.
&lt;/h2&gt;

&lt;p&gt;Today was chalked full of lessons that I either have forgotten from JS or something I probably never fully grasped 😅. But to sum it up, today was a good amount of work with &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;elif&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt; statements and how we go about nesting if/elif statements and how to list multiple separate if/elif statements. The assignments really tested my mental after a rough work day and there were definitely a few step away from the desk just because I'm exhausted. &lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="https://giphy.com/gifs/l3V0p1WFoSIrzPLW0"&gt;via GIPHY&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below are a few assignment examples:&lt;/p&gt;
&lt;h4&gt;
  
  
  BMI 2.0
&lt;/h4&gt;
&lt;h5&gt;
  
  
  Goal: Write a program that interprets the Body Mass Index (BMI) based on a user's weight and height. It should tell them the interpretation of their BMI based on the BMI value:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Under 18.5 they are underweight&lt;/li&gt;
&lt;li&gt;Over 18.5 but below 25 they have a normal weight&lt;/li&gt;
&lt;li&gt;Over 25 but below 30 they are slightly overweight&lt;/li&gt;
&lt;li&gt;Over 30 but below 35 they are obese&lt;/li&gt;
&lt;li&gt;Above 35 they are clinically obese.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My Solution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;height = float(input("enter your height in m: "))
weight = float(input("enter your weight in kg: "))

bmi = round(weight / (height ** 2))

if bmi &amp;lt; 18.5:
    print(f"Your BMI is {bmi}, you are underweight.")
elif bmi &amp;gt; 18.5 and bmi &amp;lt; 25:
    print(f"Your BMI is {bmi}, you have a normal weight.")
elif bmi &amp;gt; 25 and bmi &amp;lt; 30:
    print(f"Your BMI is {bmi}, you are slightly overweight.")
elif bmi &amp;gt; 30 and bmi &amp;lt;= 35:
    print(f"Your BMI is {bmi}, you are obese.")
else:
    print(f"Your BMI is {bmi}, you are clinically obese.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Leap Year
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Goal: Write a program that works out whether a given year is a leap year. A normal year has 365 days, leap years have 366, with an extra day in February.
&lt;/h4&gt;

&lt;p&gt;This is how you work out whether if a particular year is a leap year.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;on every year that is evenly divisible by 4 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;except&lt;/strong&gt; every year that is evenly divisible by 100 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;unless&lt;/strong&gt; the year is also evenly divisible by 400&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My Solution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;year = int(input("Which year do you want to check? "))

if year % 4 != 0:
    print("Not Leap Year.")
elif year % 4 == 0:
    if year % 100 != 0:
        print("Leap Year.")
    elif year % 100 == 0:
        if year % 400 == 0:
            print("Leap Year.")
        else:
            print("Not Leap Year.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I learned a good amount from these assignments and will def be saving these for future reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  100 Days of Code Project: Day 3 - Treasure Island Pick Your Own Adventure
&lt;/h2&gt;

&lt;p&gt;I was really excited to give this project a go when it was introduced at the beginning of the days material but after going through the day and spending more time that I thought I would, I ran out of time where I think it would be effective for me to work on this. I wouldn't retain as much knowledge as I would when fully alert.&lt;/p&gt;

&lt;p&gt;So I plan to knock out this project before work tomorrow and will update this blog with the project and my thoughts! I at least wanted to get keep the blog post itself on schedule but will NOT be up until 12am CST trying to finish this project. If you're reading this tonight, check back tomorrow for the solution but if you happen to catch this article tomorrow 8/12, then the solution and my thought should be listed as an &lt;strong&gt;Update:&lt;/strong&gt;&lt;br&gt;
Got an update here for ya! Finished the Day 3 project and you can see the solution I had below 😁.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("Welcome to Treasure Island.")
print("Your mission is to find the treasure.")

choice1 = input(
    'You\'re at a cross road. Where do you want to go? Type "left" or "right" \n').lower()
if choice1 == "left":
    choice2 = input(
        'You\'ve come to a lake. There is an island in the middle of the lake. Type "wait" to wait for a boat. Type "swim" to swim across. \n').lower()
    if choice2 == "wait":
        choice3 = input(
            "You made it to Bountiful Booty Island, where the treasures run deep as your cheeks. There is a Trap house with 3 doors. One red, one yellow and one blue. Which colour do you choose? \n").lower()
        if choice3 == "red":
            print("It's a room full of fire. Game Over.")
        elif choice3 == "yellow":
            print("You secured the bag! You Win!")
        elif choice3 == "blue":
            print("You enter a room of thirst traps. Game Over.")
        else:
            print("You chose a door that leads into a black hole. Game Over.")
    else:
        print("You get attacked by an angry goblin. Game Over.")
else:
    print("You Became depressed because you didnt find the gem. Game Over.")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like they say, learning to code is like going to the gym, and every now and then, you have to take a rest day. I plan to gom through Day 4 and 5 of the journey tomorrow since I'll be fully charged and have my full days to spend working.&lt;/p&gt;

&lt;p&gt;See ya folks! ✌🏾&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to connect as peers, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 2: Python Object and Data Structure Basics (Part 2)</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Thu, 11 Aug 2022 04:50:45 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-2-python-object-and-data-structure-basics-part-2-f24</link>
      <guid>https://dev.to/kdleonard93/day-2-python-object-and-data-structure-basics-part-2-f24</guid>
      <description>&lt;h2&gt;
  
  
  Today's Task
&lt;/h2&gt;

&lt;p&gt;So today is kind of a continuation of yesterday in terms of the information learned. I'm not sure how this will play out as I get along in both courses (Details on both courses are &lt;a href="https://blacknerd.dev/the-second-start-of-my-journey-to-become-a-fullstack-dev"&gt;noted in my 1st article&lt;/a&gt;) but it seems like the 0-100 course will move a bit faster than the 100 days of code (aka 100-DOC) course. With that being said, there might be days where I just discuss the project of the day from the 100-DOC course since I want to stay pretty concurrent with both courses. I'm also going to try and get up a bit earlier to do some of the pre-work or watch some of the course material before the evening so I',m not up late trying to stay true to my promise to myself of daily projects and blog posts.&lt;/p&gt;

&lt;h2&gt;
  
  
  100 Days of Code Project: Day 2 - Tip Calculator
&lt;/h2&gt;

&lt;p&gt;Today's project was a tip calculator. I thought the process of getting an accurate split amount was a pretty cool concept and could see myself applying that logic to other things down the line. This project required the use of &lt;code&gt;f("strings)&lt;/code&gt;, mathematical operations, value conversion (Strings -&amp;gt; Integers or Integers -&amp;gt; Float or Float/Int -&amp;gt; String), the &lt;code&gt;round()&lt;/code&gt; function, and everything we learned previously. I'd say the conversions tripped me up ever so slightly since it's typed a little differently than JS but once I did a few, it started to click. Below is the final result of my project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("Welcome to the band name generator")
bill = int(input("What is the total bill?"))
tip = int(input("What is the tip percentage? 10, 12, 0r 15?"))
people = int(input("How many people are splitting the bill?"))

total = round(bill * (1 + tip/100))
share = round(total / people, 2)

print(f"Each person should pay: {share}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: I don't plan on always adding just the solution to the article. In the beginning, while the projects are not that heavy with code, I will just throw a quick snippet. Once the projects get bigger, I'll still throw snippets but the full project will live on GitHub. I have my first 2 days pushed and plan to push a repo for each day.&lt;/p&gt;

&lt;h2&gt;
  
  
  EOD
&lt;/h2&gt;

&lt;p&gt;Today was fun and pretty interesting but all In all, I'm still at the very basic stages so things are pretty understandable and semi-relatable to JS.&lt;/p&gt;

&lt;p&gt;Note #2: I wanted to reiterate that this blog's main purpose is for me to notate my journey for notes and helpful feedback. If anyone else finds these articles helpful or just entertaining, that'll be a bonus. I also want to warn you that once I get further into the projects, I will most likely get less formal with my writing. I don't want to sound like a robot or have my articles feel like cookie-cutter opinion pieces/blogs. (Your boi, aka me, has a pretty silly personality when I get comfortable 😄).&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to connect as peers, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>100daysofcode</category>
      <category>python</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Day 1: Python Object and Data Structure Basics</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Thu, 11 Aug 2022 04:48:00 +0000</pubDate>
      <link>https://dev.to/kdleonard93/day-1-python-object-and-data-structure-basics-2ghc</link>
      <guid>https://dev.to/kdleonard93/day-1-python-object-and-data-structure-basics-2ghc</guid>
      <description>&lt;h2&gt;
  
  
  I wanted to give a quick run down on how I'll be splitting up my daily blog
&lt;/h2&gt;

&lt;p&gt;In the first portion, I'll review what I learned from the '2022 Complete Python Bootcamp" course. I'll mainly touch base on the core concepts of the section and what I learned (or struggled to learn). The second portion of the blog will be dedicated to the project I completed in the sections of the "100 Days of Code: Python" course. This read should be short, considering it's just covering the basics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Numbers, Variables, and Strings
&lt;/h3&gt;

&lt;p&gt;The first couple of lessons should not come as a surprise to anyone privy to development in any language. I could pick these concepts up easily because the syntax is very strait-forward and was easily adaptable from knowing primitive types in JS. What I noticed was different off the bat was &lt;code&gt;print()&lt;/code&gt; vs. &lt;code&gt;console.log()&lt;/code&gt;. They pretty much produce the same result but just typed differently. Another difference between JS and Python was the naming convention for Objects and Arrays. In Python, they are called &lt;code&gt;Dictionaries/Lists&lt;/code&gt; and &lt;code&gt;Sets&lt;/code&gt;, respectively. If I'm missing any other key differences that would be good to note, let me know in the comments! Most of everything else functions the same way in terms of strings and assigning variables. In the lesson, they touch base on Booleans and File I/O, but since the 100 Days of code project for Day 1 only covers String and Variables, I'll save my learnings on that for another day (most likely tomorrow 😄).&lt;/p&gt;

&lt;h3&gt;
  
  
  100 Days of Code Project: Day 1 - Band Name Generator
&lt;/h3&gt;

&lt;p&gt;Alright, so this project was pretty simple. It's basically just &lt;code&gt;print()&lt;/code&gt; statements and &lt;code&gt;input()&lt;/code&gt; statements with variables. The objective was to ask a couple of questions and have the result concatenate the two answers in a &lt;code&gt;print&lt;/code&gt; call. The code I did to complete this is below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("Welcome to the band name generator")
input("Which City Did You Grow Up In?")
city = input("Which City Did You Grow Up In?\n")
pet = input("What Is Your Pet's Name?\n")
print("your band name could be " + city + " " + pet)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I will say if I were to do this in JS, there would be a bit more syntax needed. Other than that, I think Day 1's project was pretty straightforward.&lt;/p&gt;

&lt;h3&gt;
  
  
  EOD
&lt;/h3&gt;

&lt;p&gt;That about wraps it up for Day 1. If anyone has taken these courses in Udemy and has notes, let me know! Also, if anyone wants to just chime in, please do as I am open to any helpful corrections, tips, and lessons 😁.&lt;/p&gt;

&lt;h4&gt;
  
  
  If you want to keep up with my progress or just want to add me as a peer, check out my social links below and give me a follow!
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/RingoMandingo93"&gt;🐦 Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kdleonard93"&gt;💻 Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/users/407639833146818570"&gt;👾 Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/kyle-leonard93/"&gt;👔 LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>100daysofcode</category>
      <category>python</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The (Second) Start of My Journey to Become a FullStack Dev</title>
      <dc:creator>Kyle Leonard</dc:creator>
      <pubDate>Tue, 09 Aug 2022 15:53:00 +0000</pubDate>
      <link>https://dev.to/kdleonard93/the-second-start-of-my-journey-to-become-a-fullstack-dev-15dj</link>
      <guid>https://dev.to/kdleonard93/the-second-start-of-my-journey-to-become-a-fullstack-dev-15dj</guid>
      <description>&lt;p&gt;Welcome, Everyone!&lt;/p&gt;

&lt;p&gt;I want to give a quick intro about myself, the purpose of this blog, and how I plan to use it moving forward. I'm currently a Content Developer a Dealer Inspire (a Cars.com company) and have been in the tech industry as a professional for about three years. TL:DR - I plan to use this blog to note the things I learned, projects that I've completed, and hardships I come across on my journey in learning back-end tech, starting with Python 😁. &lt;/p&gt;

&lt;h2&gt;
  
  
  A Little About Myself
&lt;/h2&gt;

&lt;p&gt;As a kid, I've always had a thing for technology but didn't get into coding until after college, when my initial career path was to become a Physical Therapist (&lt;em&gt;I dodged a bullet there&lt;/em&gt;). My desire to make a VST for music production brought me to coding. I'm a HUGE music fan and have had a hand in Music Production and Audio Engineering for quite some time. Looking into how to make that happen led me to web development, where I started self-studying through Udemy and ultimately went through Lambda School (Now Bloom Institute Of Technology), which landed me the job I have now. I'd say that the whole process took about three years, and I'll admit, it could have been a bit shorter if I was more laser-focused 😅 but such is life.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Kickstart to My (Second) Journey to Become A Full-Stack Dev
&lt;/h2&gt;

&lt;p&gt;Through lambda school, I retained a TON of my front-end knowledge since that's what I completed through self-studying with Udemy, but when it came to Back-End, it was a fresh plate of gibberish that I had to wrap my head around. Not only that, I landed my job at Dealer Inspire before we got to the back-end unit, so I was trying to juggle working/learning the ropes at my new job + trying to put in work after hours to learn Back-End (Python, Node.Js, Express, SQL). Let me tell you, to have this on my day-to-day was rough as is, and then the pandemic hit 😵‍💫. So I took a Hiatus from Lambda to focus on learning my job in and out to perform well. &lt;br&gt;
What I didn't expect though, was for Lambda to change its curriculum and discontinue any new part-time cohorts. So when I tried to get back into an ongoing cohort at my current unit, I was told there weren't any I'd have to join a full-time cohort to finish. That was NOT an option since I needed to pay bills. So I got screwed out of earning my certificate even though I still have to pay the total amount of the Income Share Agreement (since I got so far into the curriculum; I was on the last unit when I needed to take the hiatus). To put it lightly, it sucked. Luckily, I did land an entry-level job before entirely bailing on my certification and have since earned my place as a Content Developer.&lt;br&gt;
I have lost a lot of the knowledge that I was able to pick up and retain when still in school and have been struggling to find the motivation to be consistent on my own with self-studying again. Now that I've hit a growth/creativity wall at my current job, now is a better time to light a fire under my ass and start learning back-end again.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Plans for This Blog
&lt;/h2&gt;

&lt;p&gt;I wanted to have some accountability and a way to note the things I learn daily to reference when I need to. I also feel like I'm not the only person with a similar struggle and yearning to be better and more accountable with their learning, so I would love for anyone to join this journey with me or even give advice in the comments. My first goal is to learn Python. I plan to use Udemy since the cost is very reasonable for courses, and it should be a good starting point for me to get the basics down. So I purchased two courses; &lt;a href="https://www.udemy.com/course/complete-python-bootcamp/"&gt;First course&lt;/a&gt; is a "Zero To Hero" style course, and the &lt;a href="https://www.udemy.com/course/100-days-of-code/"&gt;second course&lt;/a&gt; is a 100 days of code for Python which will give me daily projects to do to refine my skill. The goal is to go through all 100 days by doing at least a unit from each course per day starting tomorrow, August 9th, 2022. Today, I will just get myself prepped and set my learning schedule moving forward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let Us Begin!
&lt;/h2&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
