<?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: Bonface Thuo</title>
    <description>The latest articles on DEV Community by Bonface Thuo (@alpha3020).</description>
    <link>https://dev.to/alpha3020</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%2F3951874%2Fa3be242c-84fe-4f1b-8336-8073d05b8446.jpg</url>
      <title>DEV Community: Bonface Thuo</title>
      <link>https://dev.to/alpha3020</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alpha3020"/>
    <language>en</language>
    <item>
      <title>Python: Day Two – Variables, Data Types, and Putting Stuff in Boxes</title>
      <dc:creator>Bonface Thuo</dc:creator>
      <pubDate>Thu, 28 May 2026 07:29:26 +0000</pubDate>
      <link>https://dev.to/alpha3020/python-day-two-variables-data-types-and-putting-stuff-in-boxes-11o2</link>
      <guid>https://dev.to/alpha3020/python-day-two-variables-data-types-and-putting-stuff-in-boxes-11o2</guid>
      <description>&lt;p&gt;Welcome back to Day 2, coders! 🚀 Yesterday we mastered the art of making the console say "Hello, World!" and survived the great indentation panic. 😅 Today, we are leveling up! We need to teach our Python scripts how to actually &lt;em&gt;remember&lt;/em&gt; things. 🧠&lt;/p&gt;

&lt;p&gt;Grab your beverage of choice ☕, and let's talk about variables, data types, and data structures! 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  📦 Variables: The Magic Storage Boxes
&lt;/h2&gt;

&lt;p&gt;Think of your computer's memory as a giant, empty warehouse. 🏭 A &lt;strong&gt;variable&lt;/strong&gt; is basically a cardboard box you bring into that warehouse. You scribble a name on the outside of the box with a sharpie 🖍️, and you chuck some data inside! 📥&lt;/p&gt;

&lt;p&gt;In Python, creating a variable is ridiculously easy. You don't have to announce what kind of box it is beforehand (unlike some &lt;em&gt;other&lt;/em&gt; languages 🤭). You just name it and put something in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Naming our boxes and putting stuff inside 🎁
&lt;/span&gt;&lt;span class="n"&gt;player_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Mario&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;span class="n"&gt;health&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;99.5&lt;/span&gt;
&lt;span class="n"&gt;is_game_over&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;player_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Prints: Mario
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt;&lt;/em&gt; 📏 Give your variables clear names! user_age = 25 is fantastic. 🌟 x = 25 will make you hate yourself in exactly two weeks when you completely forget what x stands for. 😭&lt;/p&gt;

&lt;h1&gt;
  
  
  🧬 Data Types: What's inside the box?
&lt;/h1&gt;

&lt;p&gt;Now, what exactly can we put in these boxes? Understanding the type of your data is half the battle when you're coding. Here are the four basic building blocks you will use 99% of the time: 🧱&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Strings (str) 🔤&lt;/strong&gt;&lt;br&gt;
Strings are just text. Wrap them up in single or double quotes. 🧶 If it has quotes, Python treats it like words, even if it looks like math! 🚫➕&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello there!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;fake_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;42&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="c1"&gt;# Python thinks this is a word, not math! 🤯
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Integers (int) 🔢&lt;/strong&gt;&lt;br&gt;
Whole numbers. Positive or negative, but absolutely no decimals allowed! 🛑 Great for counting your extra lives. 👾&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;lives_left&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="n"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Floats (float) 💧&lt;/strong&gt;&lt;br&gt;
Numbers with a decimal point. Whenever you need exact precision (like currency 💸, weights ⚖️, or scientific measurements 🧪), you use a float!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;19.99&lt;/span&gt;
&lt;span class="n"&gt;pi_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14159&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Booleans (bool) 🚦&lt;/strong&gt;&lt;br&gt;
True or False. Yes or No. 🟢🔴 That’s it! These are the ultimate decision-makers in your code. (Note: The T and F must be capitalized in Python, or it throws a tantrum! 😤)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;has_coffee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
&lt;span class="n"&gt;is_tired&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🚀 Today's Challenge 🏆&lt;/strong&gt;&lt;br&gt;
Try creating a mini-profile for your favorite fictional character using just variables! 🦸‍♂️ Create a string for their name, an integer for their age, a float for their power level (like 9000.5), and a boolean for whether they are currently saving the world (True or False). Print them all out and see what happens!&lt;/p&gt;

&lt;p&gt;That's a wrap for Day 2! 🎬 We can now store text and numbers like pros. Tomorrow, we are going to tackle Lists and learn how to pack our virtual backpacks with all these awesome variables. 🎒 Are you feeling like a true programmer yet? 😎 Let me know in the comments how your character profile challenge goes! 🐍💻👇&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Hello World, Meet Python! (A Beginner's Guide to Not Breaking Things)</title>
      <dc:creator>Bonface Thuo</dc:creator>
      <pubDate>Tue, 26 May 2026 06:59:07 +0000</pubDate>
      <link>https://dev.to/alpha3020/hello-world-meet-python-a-beginners-guide-to-not-breaking-things-2ppe</link>
      <guid>https://dev.to/alpha3020/hello-world-meet-python-a-beginners-guide-to-not-breaking-things-2ppe</guid>
      <description>&lt;h2&gt;
  
  
  Python: Day One – The Indentation Struggle is Real (Will it ever print?)
&lt;/h2&gt;

&lt;p&gt;Hey everyone! 👋 Welcome to Day 1 of my Python journey. I've decided it's finally time to tame the snake, dive into the code, and inevitably spend 45 minutes staring at my screen because I missed a single quotation mark. &lt;/p&gt;

&lt;p&gt;We are starting from the very beginning today. Grab a coffee, and let's get into it!&lt;/p&gt;




&lt;h2&gt;
  
  
  What exactly is Python? 🤔
&lt;/h2&gt;

&lt;p&gt;Before we start typing wildly, let's establish what we're actually working with. Python is a &lt;strong&gt;high-level, interpreted programming language&lt;/strong&gt;. That is just a fancy, technical way of saying that the code looks a lot closer to human English than robot binary, which makes it much easier to write and run. &lt;/p&gt;

&lt;p&gt;It is incredibly popular because of its &lt;strong&gt;simple and readable syntax&lt;/strong&gt;. Plus, it's basically the Swiss Army knife of coding. You can use it for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🕸️ Web development&lt;/li&gt;
&lt;li&gt;📊 Data analysis&lt;/li&gt;
&lt;li&gt;🤖 Machine learning&lt;/li&gt;
&lt;li&gt;⚙️ Automation (making the computer do your boring tasks!)&lt;/li&gt;
&lt;li&gt;🎮 Game development&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Our First Magic Trick: The &lt;code&gt;print()&lt;/code&gt; Function 🪄
&lt;/h2&gt;

&lt;p&gt;The absolute most basic thing you can do in Python is command the computer to talk back to you. We do this using the &lt;code&gt;print()&lt;/code&gt; function, which displays output straight to the console.&lt;/p&gt;

&lt;p&gt;Here is the rite of passage for every developer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Basic print statement
&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;Hello, World!&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;Welcome to Python!&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;This is your first Python program&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;h1&gt;
  
  
  Mixing it Up: Strings and Numbers
&lt;/h1&gt;

&lt;p&gt;The print() function isn't just for basic text (which we call "strings"). You can print numbers, or even string multiple items together just by separating them with commas!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Print with numbers
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;42&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="mf"&gt;3.14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Printing multiple items separated by commas
&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;Python&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;is&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;awesome&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Multiple values on one line
&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;Age:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Name:&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;Alice&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;That’s a wrap for Day 1! We've successfully made the computer speak to us, and more importantly, we haven't broken anything yet.&lt;/p&gt;

&lt;p&gt;Are you learning Python right now too? Let me know in the comments what you're struggling with (or what you're enjoying!) so we can suffer through the indentation errors together. 🐍💻&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
