<?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: Faith</title>
    <description>The latest articles on DEV Community by Faith (@faith_ondiege_6e7c59f9ac3).</description>
    <link>https://dev.to/faith_ondiege_6e7c59f9ac3</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4070902%2F8d1235a0-90d6-4424-83c9-1079d6a34c7a.png</url>
      <title>DEV Community: Faith</title>
      <link>https://dev.to/faith_ondiege_6e7c59f9ac3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/faith_ondiege_6e7c59f9ac3"/>
    <language>en</language>
    <item>
      <title>Getting Started with Excel for Data Analytics: From Basics to Data Cleaning.</title>
      <dc:creator>Faith</dc:creator>
      <pubDate>Sun, 30 Aug 2026 14:23:33 +0000</pubDate>
      <link>https://dev.to/faith_ondiege_6e7c59f9ac3/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-4pd6</link>
      <guid>https://dev.to/faith_ondiege_6e7c59f9ac3/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-4pd6</guid>
      <description>&lt;p&gt;I just came to the realization that &lt;strong&gt;Microsoft Excel&lt;/strong&gt; is one of the most commonly tools used at the workplace. Not for anything else but for data analysis. I have never thought of it this way. Given my background in Finance, we use Excel for bragging rights depending on how many formulas you created and run on excel to make your your financial models run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Cleaning
&lt;/h2&gt;

&lt;p&gt;Before any analysis, most data requires to be cleaned or adjusted in a way that it is easily used for any analytical work. Data collection sometimes comes with variant responses that make it hard to use the data as it is. Making it necessary to clean data before usage. A really cool tool I learnt this week was &lt;strong&gt;Data Validation&lt;/strong&gt;. This helps restrict the type of feedback you get per column making it easier when you use the data later. An example would be to restrict product categories that one can enter or maximum and minimum limits. Enforcing it is a easy as: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Selecting the necessary cells &lt;/li&gt;
&lt;li&gt;On the ribbon, click &lt;strong&gt;Data&lt;/strong&gt; then &lt;strong&gt;Data Validation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Allow&lt;/strong&gt;, select &lt;strong&gt;List&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Source&lt;/strong&gt;, type values separated by commas&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzkfuws2k2k4v5ryxjvpl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzkfuws2k2k4v5ryxjvpl.png" alt=" " width="799" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Applied Data Validation on the Employee column Validation to ensure that only whole numbers are allowed after removing duplicates from the dataset.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filtering
&lt;/h2&gt;

&lt;p&gt;Another important tool in Excel has to be filtering, thinking of it now I should have started with this one.&lt;br&gt;
This gives an over view of how the data looks like, if you actually need to apply changes to the data or leave it as it and so on. I believe it is impossible to use excel especially when interacting with &lt;strong&gt;tons of data&lt;/strong&gt; and not use filtering. &lt;br&gt;
It's like a sneak peek of the data displaying only the rows that meet criteria while the rest stay hidden.&lt;/p&gt;

&lt;p&gt;How do we exactly do that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click anywhere in the dataset&lt;/li&gt;
&lt;li&gt;On the Home tab, go to Sort and Filter, Filter&lt;/li&gt;
&lt;li&gt;Click on a dropdown on the header row&lt;/li&gt;
&lt;li&gt;Choose the values to show or use&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftax0q30kblt4aoq8l8lx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftax0q30kblt4aoq8l8lx.png" alt=" " width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before I realized that some columns have entries that are wrongly spelt and written, I filtered my data to see that and replaced the entries with what aligned with the options available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Formatting and Cleaning
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Number formatting
&lt;/h3&gt;

&lt;p&gt;This function of Excel would come in handy when you probably are trying to perform a mathematical operation but it just wouldn't work. Chances are the formatting isn't appropriate of the data type. A hint that would help to determine if the formatting is appropriate is; numerical data aligns to the right while text to the left. However, this sometimes isn't enough.&lt;/p&gt;

&lt;p&gt;Let's now get to how it is done:&lt;/p&gt;

&lt;h4&gt;
  
  
  Percentage formatting
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Select cells&lt;/li&gt;
&lt;li&gt;Home &amp;gt; Number group&amp;gt; Click % symbol&lt;/li&gt;
&lt;li&gt;Numbers convert to %&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Currency formatting steps
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Select the cells with numbers&lt;/li&gt;
&lt;li&gt;Home tab &amp;gt; Number group&lt;/li&gt;
&lt;li&gt;Click the dropdown arrow on the number format box&lt;/li&gt;
&lt;li&gt;Select Currency or Accounting&lt;/li&gt;
&lt;li&gt;Change the currency by clicking the small dialog launcher&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A simpler way to do it on the Home tab to go to the number segment and click on the drop down on the bottom right and any changes can be made from there&lt;/p&gt;

&lt;h2&gt;
  
  
  Conditional Formatting
&lt;/h2&gt;

&lt;p&gt;This is a useful tool especially if you need to pay attention to a &lt;strong&gt;criterion&lt;/strong&gt; or a group of data. It highlights cells automatically based on the rules set, helping with locating with trends and that which you wish.&lt;br&gt;
An example is when handling credit data and if the loan is way past due time, conditional formatting can be used to categories the different classes of default.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to Home &amp;gt; Conditional Formatting &lt;/li&gt;
&lt;li&gt;Choose a rule type: &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Highlight Cell Rules (Greater than, Less than) &lt;/li&gt;
&lt;li&gt;Top/Bottom Rules &lt;/li&gt;
&lt;li&gt;Data Bars, Color Scales, Icon Sets&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;For example, select Highlight Cell Rules &amp;gt; Less Than &lt;/li&gt;
&lt;li&gt;Enter a value &lt;/li&gt;
&lt;li&gt;Choose a formatting style (e.g., green fill) &lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is so much that one can do when it comes to data analysis. However, I have focused on the ones that I use a lot more, but on the contrary they don't seem to be that obvious such as removing duplicates and data sorting.&lt;br&gt;
Hope this makes data analysis on Excel a bit lighter and faster for you as it did for me. &lt;br&gt;
On a lighter note, I would always recommend videos incase anything isn't clear, practice does it better than any other way.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
    </item>
    <item>
      <title>My First GitHub Project: From a Local Folder to GitHub Using Git and SSH</title>
      <dc:creator>Faith</dc:creator>
      <pubDate>Sat, 22 Aug 2026 17:29:53 +0000</pubDate>
      <link>https://dev.to/faith_ondiege_6e7c59f9ac3/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-5g6o</link>
      <guid>https://dev.to/faith_ondiege_6e7c59f9ac3/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-5g6o</guid>
      <description>&lt;p&gt;It took me to set up &lt;strong&gt;my Git&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt; to realize how technology is sometimes not that straight forward at least for beginners. I mean setting up an account should be the easiest part of technology right? However Git and GitHub are packaged differently, forcing us to bear the brunt of its's convolution.&lt;/p&gt;

&lt;p&gt;I'll break down the process to make it ingestible without intimidating a soul, because this too shall pass. Later, we will look back and be astonished of how something simple got our necks on a chokehold.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Installation
&lt;/h2&gt;

&lt;p&gt;First things first, you have to set up a GitHub account on GitHub and then download git and Git Bash. I'll share a more detailed guide of this process don't worry. Git Bash is sort of the terminal that we'll use to write our commands while connecting our git to Git Bash. Git runs locally and keeps track of changes during the project while GitHub is an online version that does the same. Depending on your &lt;strong&gt;Operating System&lt;/strong&gt; there are different ways to download Git. Alternatively, VS Code can be used to push your projects to GitHub and that's what we'll focus on, since its the simplest one. At this point I'm assuming we have a project that needs pushing to GitHub. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Creating a folder locally
&lt;/h2&gt;

&lt;p&gt;There are shortcuts to create and edit files using Git Bash when doing projects and I thought it best to include them here for posterity and experiment as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;mkdir&lt;/em&gt;  makes a directory/creates a folder eg mkdir &lt;strong&gt;Analytics Project&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure not to include space on the name of the folder, use hyphens or underscore instead. Alternatively, enclose the name of the folder in quotation marks if spaces are used in naming the folder, then and add the your data set into the folder created.&lt;/p&gt;

&lt;p&gt;These commands are useful in Git Bash depending on which stage of the process you are in.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;cd&lt;/em&gt;  changes to another directory (cd "Analytics Project')
&lt;em&gt;cd/path/to/your/repository&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;cd&lt;/em&gt; .. takes you back to previous directory&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;ls&lt;/em&gt; lists down what's in the folder&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;rm&lt;/em&gt; deletes document in the folder&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;rm -r&lt;/em&gt; deletes the folder in the folder&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Creating a README file
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;touch&lt;/em&gt; creates a &lt;strong&gt;README&lt;/strong&gt; document (touch README.md) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A readme file is important for  documenting the process of a project. It usually acts as a contact point with anyone interacting with the your digital product. &lt;/p&gt;

&lt;p&gt;On Git bash or terminal, access the folder cd &lt;em&gt;Analytics Project&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;To edit content in README.md file, we'll use the command &lt;strong&gt;echo&lt;/strong&gt; "Analytics Project" &amp;gt;README.md &lt;br&gt;
To check what is written, we'll use the command &lt;strong&gt;cat&lt;/strong&gt; README.md&lt;br&gt;
&lt;strong&gt;Nano&lt;/strong&gt; can be used to simplify editing. This has to be my preferred method of editing as it is the easiest to use, especially when you are a beginner. &lt;br&gt;
Running the command nano README.md will make a text editor appear where in we shall edit our content.&lt;br&gt;
To Save content, press &lt;strong&gt;Control + O&lt;/strong&gt;, &lt;br&gt;
Press Enter Key to confirm the file, then press Control + X to exit._&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Git Configuration
&lt;/h2&gt;

&lt;p&gt;This is probably the simplest part of this process after creating a GitHub account. On Git Bash, check user name user email by running&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global --list&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If the account that exists isn't yours or you'd like to use a different one we can overwrite the existing account by using&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global user.name "YourGitHub Profile Name"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then you'll be prompted to add a passphrase which is basically a password, it's advisable not to write one incase you forget it. So just *&lt;em&gt;ENTER *&lt;/em&gt; to move to the next step.&lt;/p&gt;

&lt;p&gt;Incase you'd like to change your branch from master to main run;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global init.defaultBranch main&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Key Generation using SSH
&lt;/h3&gt;

&lt;p&gt;In this part we'll be generating a SSH key that we'll use to connect our Git and GitHub. SSH helps us with security because our computer needs a secure way to prove to GitHub that it is authorized to access our GitHub account&lt;br&gt;
SSH stands for: Secure Shell&lt;br&gt;
With SSH authentication, you create a pair of cryptographic keys.&lt;br&gt;
GitHub requires the public key to be added to your account, while the corresponding private key stays on our computer. Now, this is where things a bit technical.&lt;/p&gt;

&lt;p&gt;When we generate an SSH key, you will normally get 2 keys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;id_ed25519     - private key&lt;/li&gt;
&lt;li&gt;id_ed25519.pub - Public key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But, I'd like us to generate a public key using a shortcut:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "your_email@example.com"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then a prompt to overwrite will appear, write "y" meaning yes and press Enter. If you chose to have a password input, if you didn't press Enter then run&lt;/p&gt;

&lt;p&gt;&lt;code&gt;clip &amp;lt; /c/Users/user/.ssh/id_ed25519.pub&lt;/code&gt; to save they public key in a file.&lt;/p&gt;

&lt;h4&gt;
  
  
  Testing
&lt;/h4&gt;

&lt;p&gt;We've already generated a key, now we use an IDE in this case VS Code to push our project to GitHub.&lt;/p&gt;

&lt;p&gt;To confirm if we've connected our Git to GitHub using the SSH Key that we have generated. Go to Git Bash terminal and run&lt;br&gt;
&lt;code&gt;ssh -T git@github.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;There shouldn't be any problem with this but if anything isn't seeming right, you can always Chat GPT.&lt;/p&gt;

&lt;p&gt;Okay now let's copy our generated key to GitHub&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your GitHub account&lt;/li&gt;
&lt;li&gt;Go to settings&lt;/li&gt;
&lt;li&gt;Click SSH and GPG&lt;/li&gt;
&lt;li&gt;Delete and add new or simply add the generated key if there are no keys yet&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Using VS Code
&lt;/h4&gt;

&lt;p&gt;You can create a folder or choose a folder through VS Code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to file&lt;/li&gt;
&lt;li&gt;Open your folder containing your project&lt;/li&gt;
&lt;li&gt;select your folder&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Connecting Git to GitHub
&lt;/h4&gt;

&lt;p&gt;Now we'll configure GitHub by;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clicking Source control on the left side &lt;/li&gt;
&lt;li&gt;Choose Manage work trust&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initialize repository - this is the equivalent of &lt;strong&gt;git innit&lt;/strong&gt; when using Git Bash. It creates a hidden .Git directory which contains information that our Git uses to track the developments and changes.&lt;br&gt;
Initializing the repository allows our project folder to become a Git Repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add change - this is a write up of the content you would like to indicate in present tense eg "Add Dataset". This is analogous to writing &lt;strong&gt;git commit -m " "&lt;/strong&gt;, while using terminal or Git Bash. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Against commit on the far right click the drop down and choose commit and sync. Comparable to this is &lt;strong&gt;git push origin main&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After pushing our project to GitHub, you can run command &lt;strong&gt;Git status&lt;/strong&gt; to confirm everything is as you wanted it to be and maybe adjust accordingly.&lt;/p&gt;

&lt;p&gt;From here you'll see a number of prompts, only click "Always", "Add remote", "Publish Branch", "Allow- if configuring for the first time."&lt;/p&gt;

&lt;p&gt;Lastly, choose a browser of your choice and authorize access remembering to chose between creating a &lt;strong&gt;public&lt;/strong&gt; or &lt;strong&gt;private&lt;/strong&gt; &lt;strong&gt;key&lt;/strong&gt; depending on your choice and preference, Sign in and viola, The project is posted on GitHub. &lt;/p&gt;

&lt;p&gt;Something to note the name of the repository will bear the name of the folder used.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;That's it imagine, there are other ways to push your projects to GitHub if that's something you are interested in , be sure to find that out, there's also a lot more to know in GitHub and GitHub Configuration but baby steps, right? That's all for today all and the best at pushing your projects on GitHub.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>gitbash</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Build A Calculator Using Python</title>
      <dc:creator>Faith</dc:creator>
      <pubDate>Mon, 10 Aug 2026 17:41:52 +0000</pubDate>
      <link>https://dev.to/faith_ondiege_6e7c59f9ac3/build-a-calculator-using-python-2f57</link>
      <guid>https://dev.to/faith_ondiege_6e7c59f9ac3/build-a-calculator-using-python-2f57</guid>
      <description>&lt;h1&gt;
  
  
  Using Loops
&lt;/h1&gt;

&lt;p&gt;This has to be the easiest way to apply your &lt;strong&gt;python&lt;/strong&gt; skills after learning the basics. The best and only way to learn anything is through rolling your sleeves and practicing, python for this case is no exception. Just like any other rookie, I did really struggle with what to start with given some projects online are quoted "beginner" but ended up not being beginner friendly to me. &lt;br&gt;
Yeah, I know this project is not all that, but it helps retain the concepts learnt and keeps the spark alive, at least it does for me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lines of Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;===== Advanced Calculator =====&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Basic: +, -, *, /&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Adv: power (^) and Modulus (%)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sci: sqrt, log&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Trig: sin, cos, tan&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# get the operator
&lt;/span&gt;&lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Enter Operator: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Binary operations
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;+&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;^&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;%&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter 1st num: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;num2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter 2nd num: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;+&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;^&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;%&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This are lines of code that can be used to explore loops in python because theory alone doesn't cut it. The first part of the code, the one consisting of print() at the beginning, are an explanation of the arithmetic operators used, you don't really need to have it.&lt;/p&gt;

</description>
      <category>python</category>
      <category>rookie</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
