<?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: zachmusiakiewicz</title>
    <description>The latest articles on DEV Community by zachmusiakiewicz (@zachmusiakiewicz).</description>
    <link>https://dev.to/zachmusiakiewicz</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%2F1214744%2F687c56e5-a0d7-4c0a-b681-04fe5fbe4a82.jpg</url>
      <title>DEV Community: zachmusiakiewicz</title>
      <link>https://dev.to/zachmusiakiewicz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zachmusiakiewicz"/>
    <language>en</language>
    <item>
      <title>My First Python Project</title>
      <dc:creator>zachmusiakiewicz</dc:creator>
      <pubDate>Mon, 20 Nov 2023 23:27:03 +0000</pubDate>
      <link>https://dev.to/zachmusiakiewicz/my-first-python-project-2pp2</link>
      <guid>https://dev.to/zachmusiakiewicz/my-first-python-project-2pp2</guid>
      <description>&lt;p&gt;Hello everyone, the last two months I have been learning the fundamentals of Python in effort to complete Codecademy's Computer Science Career Path.  As I neared the end of the first section, I was sent off-platform to create my first Python project in which I chose a weight loss tracker.  I used my new knowledge along with some help from the internet.  The weight loss tracker seemed like a good idea to me, because it encompasses all of the things I learned without going too crazy.&lt;/p&gt;

&lt;p&gt;Let me explain some of the code below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KcWU_rIT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnj8u1xrwztuwv1h40qf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KcWU_rIT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnj8u1xrwztuwv1h40qf.png" alt="Image description" width="800" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first thing I did was create a class called weightLoss which I knew would carry a bulk of the code.  &lt;/p&gt;

&lt;p&gt;I then used a constructor method and passed two parameters.  &lt;/p&gt;

&lt;p&gt;Through that, I was able to make classes for initial_weight, target_weight, and weight_log.  &lt;/p&gt;

&lt;p&gt;The target_weight was equal to None, which you will see why in an upcoming method.  The weight_log was set to be an empty list so that we can append the user's entries later on.&lt;/p&gt;

&lt;p&gt;Next, I created a method to record a weight entry.  I passed in self, date, and weight.  Through this I was able to define a record variable and then append it to the empty list before.  I also added current_weight as a class.&lt;/p&gt;

&lt;p&gt;The following method was for the user to set their target weight where I defined it as a class.&lt;/p&gt;

&lt;p&gt;Then, there is a method to calculate weight where I defined weight_loss as a variable and subtracted the initial_weight from the target_weight.  The method returns weight_loss as long as there is a target weight.&lt;/p&gt;

&lt;p&gt;The biggest method of this class is the get_progress method.  Here, I referred to the calculate_weight method to get the weight loss number, and then depending on how it came back, returned a string to the user using conditional statements. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TsB76zAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jk3yezzx0f2hb7sw1yp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TsB76zAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jk3yezzx0f2hb7sw1yp.png" alt="Image description" width="800" height="822"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then defined a main function to put it all together.  By defining initial_weight and target_weight as variables with print statements using input(), the user can fire back with their numbers.&lt;/p&gt;

&lt;p&gt;Defining program as a variable made it easy to call an instance of the weightLoss class and pass those parameters in.  &lt;/p&gt;

&lt;p&gt;Finally, while True: is filled with the instructions and responses the user will input and see when they interact with the code.&lt;/p&gt;

&lt;p&gt;This was only my first project and I really enjoyed making it, I watched a lot of videos and spent a lot of time just understanding what I was doing with some guidance. I will keep posting my progress here, next time something even cooler.&lt;/p&gt;

&lt;p&gt;Here is a link to my project on GitHub:&lt;br&gt;
&lt;a href="https://github.com/zachmusiakiewicz/ZachFirstProject/blob/main/CodeProject2.py"&gt;https://github.com/zachmusiakiewicz/ZachFirstProject/blob/main/CodeProject2.py&lt;/a&gt;&lt;/p&gt;

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