<?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: Jordan5224</title>
    <description>The latest articles on DEV Community by Jordan5224 (@jordan5224).</description>
    <link>https://dev.to/jordan5224</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%2F853245%2Fa4da7a8f-3998-48b9-a0c3-718fb9be7625.png</url>
      <title>DEV Community: Jordan5224</title>
      <link>https://dev.to/jordan5224</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jordan5224"/>
    <language>en</language>
    <item>
      <title>100 Days of Code: Day 3</title>
      <dc:creator>Jordan5224</dc:creator>
      <pubDate>Thu, 05 May 2022 22:03:46 +0000</pubDate>
      <link>https://dev.to/jordan5224/100-days-of-code-day-3-49f2</link>
      <guid>https://dev.to/jordan5224/100-days-of-code-day-3-49f2</guid>
      <description>&lt;p&gt;Today I covered conditional statements in Python.&lt;/p&gt;

&lt;p&gt;For practice, I made a pizza ordering system. How it works is the user is asked 3 questions: What size pizza they want (small, medium or large), if they want pepperoni and finally, if they want extra cheese.&lt;/p&gt;

&lt;p&gt;These 3 questions are stored in 3 variables with an input function.&lt;/p&gt;

&lt;p&gt;I started by creating an additional variable named 'bill' and then writing the conditional statements:&lt;/p&gt;

&lt;p&gt;bill = 0&lt;/p&gt;

&lt;p&gt;if size == "S":&lt;br&gt;
bill += 15&lt;br&gt;
if add_pepperoni == "Y":&lt;br&gt;
bill += 2&lt;/p&gt;

&lt;p&gt;The above code was followed by 'else if' statements to trigger the other conditions if the first one wasn't true.&lt;/p&gt;

&lt;p&gt;I created a separate if statement to determine if the price of extra cheese was going to be added to the bill:&lt;/p&gt;

&lt;p&gt;if extra_cheese == "Y":&lt;br&gt;
bill += 1&lt;br&gt;
print(f"Your final bill is: ${bill}.")&lt;/p&gt;

&lt;p&gt;Below is an example of the final result:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Welcome to Python Pizza Deliveries!&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;What size pizza do you want? S, M, or L&lt;/strong&gt; M&lt;br&gt;
&lt;strong&gt;Do you want pepperoni? Y or N&lt;/strong&gt; Y&lt;br&gt;
&lt;strong&gt;Do you want extra cheese? Y or N&lt;/strong&gt; Y&lt;br&gt;
&lt;strong&gt;Your final bill is: $24.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>100 Days of Code: Day 2</title>
      <dc:creator>Jordan5224</dc:creator>
      <pubDate>Wed, 04 May 2022 19:30:20 +0000</pubDate>
      <link>https://dev.to/jordan5224/100-days-of-code-day-2-3096</link>
      <guid>https://dev.to/jordan5224/100-days-of-code-day-2-3096</guid>
      <description>&lt;p&gt;On day 2 I wrote a program to calculate how many days, weeks and months someone would have left based on their age in years and assuming they lived to 90.&lt;/p&gt;

&lt;p&gt;I started with a variable called age that prompts the user for their age.&lt;/p&gt;

&lt;p&gt;Then I created 3 additional variables: age_in_days, age_in_weeks and age_in_months.&lt;/p&gt;

&lt;p&gt;Each variable holds either the number 365 (days), 52 (weeks) or 12 (months). They then get multiplied by the age the user input as their current age. &lt;/p&gt;

&lt;p&gt;Afterwards, I created another 3 variables that hold the following calculations:&lt;/p&gt;

&lt;p&gt;remaining_days = 365 * 90 - age_in_days&lt;br&gt;
remaining_weeks =  52 * 90 - age_in_weeks&lt;br&gt;
remaining_months = 12 * 90 - age_in_months&lt;/p&gt;

&lt;p&gt;Finally I used the following print function:&lt;/p&gt;

&lt;p&gt;print(f"You have {remaining_days} days, {remaining_weeks} weeks, and {remaining_months} months left.")&lt;/p&gt;

&lt;p&gt;Below is an example of what happens when this code runs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is your current age?&lt;/strong&gt; 25&lt;br&gt;
&lt;strong&gt;You have 23725 days, 3380 weeks, and 780 months left.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>100 Days of Code: Day 1</title>
      <dc:creator>Jordan5224</dc:creator>
      <pubDate>Tue, 03 May 2022 23:14:04 +0000</pubDate>
      <link>https://dev.to/jordan5224/100-days-of-code-day-1-2fdj</link>
      <guid>https://dev.to/jordan5224/100-days-of-code-day-1-2fdj</guid>
      <description>&lt;p&gt;On day 1 of my 100 days of code journey I learned how to use string manipulation, variables and the len, print and input function.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;print("Hello " + input("What is your name? ")) &lt;/p&gt;

&lt;p&gt;The above line of code prompts you to enter your name and then greets you with a hello, followed by your name. &lt;/p&gt;

&lt;p&gt;print(len(input("What is your name? ")))&lt;/p&gt;

&lt;p&gt;By using the len function (short for length) I was able to return the number of characters that you enter as your name. For example, entering "John" will print the number 4 to the console. &lt;/p&gt;

&lt;p&gt;name = "Henry"&lt;br&gt;
print(name)&lt;/p&gt;

&lt;p&gt;The above line of code stores a string in a variable. By using the print function and referring to the variable name in the parentheses I was able to print the value that the variable was holding, to the console, i.e. "Henry". &lt;/p&gt;

&lt;p&gt;Finally to finish off the day I created a band name generator. It works by asking you 2 simple questions. The city you grew up in and the name of your pet. It then combines these 2 values to give you a name for a music band, or any type of group. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Journey to 100 Days of Code</title>
      <dc:creator>Jordan5224</dc:creator>
      <pubDate>Tue, 03 May 2022 10:03:37 +0000</pubDate>
      <link>https://dev.to/jordan5224/journey-to-100-days-of-code-498c</link>
      <guid>https://dev.to/jordan5224/journey-to-100-days-of-code-498c</guid>
      <description>&lt;p&gt;I recently started my coding journey by watching Angela Yu's 100 Days of Code Python Bootcamp course on Udemy.&lt;/p&gt;

&lt;p&gt;I was hoping to have started making blog posts by now on what I have been learning already. But I was distracted by studying for my AWS Cloud Practitioner Exam (which I have now passed!) &lt;/p&gt;

&lt;p&gt;My goal now, is to post everyday and document the things that I am learning on this coding journey. &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
