<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Ps on SourFox</title>
    <link>https://sourfox.khmersite.net/p/</link>
    <description>Recent content in Ps on SourFox</description>
    <image>
      <title>SourFox</title>
      <url>https://sourfox.khmersite.net/papermod-cover.png</url>
      <link>https://sourfox.khmersite.net/papermod-cover.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 07 Jul 2026 14:54:24 +1000</lastBuildDate>
    <atom:link href="https://sourfox.khmersite.net/p/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Piano Notes 10</title>
      <link>https://sourfox.khmersite.net/p/2026/07/piano-notes-10/</link>
      <pubDate>Tue, 07 Jul 2026 14:54:24 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/07/piano-notes-10/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A chromatic scale&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantella&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte: Roll right hand on bar 30 &amp;amp; 38, work on bar 7-8 with left hand&lt;/li&gt;
&lt;li&gt;Tarantella: roll left hand on bar 58&lt;/li&gt;
&lt;li&gt;Study: higher tempo, roll right hand on bar 16&lt;/li&gt;
&lt;li&gt;La Poupee: keep the volume lower, hold notes on left hand longer on bar 12&lt;/li&gt;
&lt;li&gt;avoid making random mistakes!!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;improvements&#34;&gt;Improvements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;force is played enough&lt;/li&gt;
&lt;li&gt;La Poupee bar 16 is played clearly&lt;/li&gt;
&lt;li&gt;Study bar 8 is played smoothly&lt;/li&gt;
&lt;li&gt;Bar 11 from Gavotte is played good&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 9</title>
      <link>https://sourfox.khmersite.net/p/2026/06/piano-notes-9/</link>
      <pubDate>Sun, 28 Jun 2026 16:09:42 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/06/piano-notes-9/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;C minor (E♭, A♭)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantella&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte: Focus on bar 7 and 11-12&lt;/li&gt;
&lt;li&gt;Tarantella: roll left hand on bar 58, play more staccato on pg 48&lt;/li&gt;
&lt;li&gt;Study: Focus on bar 8 and 24&lt;/li&gt;
&lt;li&gt;La Poupee: bar 12 and 16 must be played clearly&lt;/li&gt;
&lt;li&gt;play harder on piano. More force.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;improvements&#34;&gt;Improvements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Pinky on left hand is heard clearly on pg 48&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 8</title>
      <link>https://sourfox.khmersite.net/p/2026/06/piano-notes-8/</link>
      <pubDate>Fri, 19 Jun 2026 17:55:42 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/06/piano-notes-8/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;E♭ major (A♭, B♭, E♭)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantella&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte: Focus bar 11 - 12, dynamics from bars 9 - 16&lt;/li&gt;
&lt;li&gt;Tarantella: Practice bars 54 - 58, roll left hand on bar 58, more forte, make sure pinky is played for left hand throughout pg 48&lt;/li&gt;
&lt;li&gt;Study: Practice by 2 bars by 2 bars, focus on bars 23 - 24&lt;/li&gt;
&lt;li&gt;mp can be played normal (more pressure) on piano&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;improvements&#34;&gt;Improvements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;La Poupee tempo is good but almost there&lt;/li&gt;
&lt;li&gt;Tarantella has consistent tempo&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 7</title>
      <link>https://sourfox.khmersite.net/p/2026/06/piano-notes-7/</link>
      <pubDate>Sun, 14 Jun 2026 16:54:35 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/06/piano-notes-7/</guid>
      <description>&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantella&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte: increasing tempo even more&lt;/li&gt;
&lt;li&gt;La Poupee: increasing tempo&lt;/li&gt;
&lt;li&gt;Tarantella: keep consistent tempo&lt;/li&gt;
&lt;li&gt;Study: increasing tempo, dynamics&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;improvements&#34;&gt;Improvements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Left hand is good for La Poupee&lt;/li&gt;
&lt;li&gt;Tarantella tempo good&lt;/li&gt;
&lt;li&gt;Able to play all notes without stopping in Study&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;others&#34;&gt;Others&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Based on current progess, piano exam could be taken in end of August&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 6</title>
      <link>https://sourfox.khmersite.net/p/2026/06/piano-notes-6/</link>
      <pubDate>Sat, 06 Jun 2026 20:23:07 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/06/piano-notes-6/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;B♭ major (B♭ &amp;amp; E♭)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantella&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte: increasing tempo&lt;/li&gt;
&lt;li&gt;La Poupee: increasing tempo, hold left hand longer&lt;/li&gt;
&lt;li&gt;Tarantella: dynamics&lt;/li&gt;
&lt;li&gt;Study: no stopping, articulation, increasing tempo, phrasing, dynamics&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;improvements&#34;&gt;Improvements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Dynamics is good for La Poupee&lt;/li&gt;
&lt;li&gt;Tarantella notes are each played clearly&lt;/li&gt;
&lt;li&gt;Press the keys all the way down (acoustic piano thing)&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 5</title>
      <link>https://sourfox.khmersite.net/p/2026/05/piano-notes-5/</link>
      <pubDate>Fri, 29 May 2026 20:23:07 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/05/piano-notes-5/</guid>
      <description>&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantella&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I need to improve on dynamics for every piece&lt;/li&gt;
&lt;li&gt;I need to improve on increasing the tempo for La Poupee, Gavotte, and Study&lt;/li&gt;
&lt;li&gt;I need to work on the 2 last bars of La Poupee&lt;/li&gt;
&lt;li&gt;Practice 2 certain bars on Gavotte. (10 times each)&lt;/li&gt;
&lt;li&gt;Remember to roll hand when playing Study&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 4</title>
      <link>https://sourfox.khmersite.net/p/2026/05/piano-notes-4/</link>
      <pubDate>Wed, 27 May 2026 17:34:54 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/05/piano-notes-4/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;F chromatic scale&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Sopra&amp;rdquo; (means above or over)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;current-pieces-for-this-week&#34;&gt;Current piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;li&gt;Tarantelle&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I need to improve on dynamics for La Poupee.&lt;/li&gt;
&lt;li&gt;Tarantelle tempo is good.&lt;/li&gt;
&lt;li&gt;I need to improve on making the tempo for Study a bit faster&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 3</title>
      <link>https://sourfox.khmersite.net/p/2026/05/piano-notes-3/</link>
      <pubDate>Sat, 16 May 2026 13:28:48 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/05/piano-notes-3/</guid>
      <description>&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Focus mainly on two lines of Study&lt;/li&gt;
&lt;li&gt;Work on the last 3 bars of La Poupee&lt;/li&gt;
&lt;li&gt;Practice playing staccato softer&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano Notes 2</title>
      <link>https://sourfox.khmersite.net/p/2026/05/piano-notes-2/</link>
      <pubDate>Sat, 16 May 2026 13:19:55 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/05/piano-notes-2/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;D harmonic minor (b flat, c#)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I need to improve on slur.&lt;/li&gt;
&lt;li&gt;I need to improve on fixing the fingering for La Poupee&lt;/li&gt;
&lt;li&gt;I need to improve on f major&lt;/li&gt;
&lt;li&gt;Play the specified bar the teacher outlined to me 3 times in a row&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Piano notes</title>
      <link>https://sourfox.khmersite.net/p/2026/05/piano_notes/</link>
      <pubDate>Sun, 03 May 2026 19:38:39 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2026/05/piano_notes/</guid>
      <description>&lt;h2 id=&#34;what-did-i-learn-in-this-practice-session&#34;&gt;What did I learn in this practice session?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;E minor (F#, D#)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;new-pieces-for-this-week&#34;&gt;New piece(s) for this week&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gavotte by Amy Mary Beach&lt;/li&gt;
&lt;li&gt;La Poupee by Alexandre Tansman&lt;/li&gt;
&lt;li&gt;Study by Concone&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feedback-on-previous-pieces&#34;&gt;Feedback on previous pieces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I need to improve on slur.&lt;/li&gt;
&lt;li&gt;I need to improve on pressing the keys all the way down.&lt;/li&gt;
&lt;li&gt;Make Tarentella more clearer.&lt;/li&gt;
&lt;li&gt;Make the Harmonica more fluent.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;others&#34;&gt;Others&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Ask teacher about how to use the metronome during piano.&lt;/li&gt;
&lt;li&gt;PAY DA FEE&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Converting Temperature from Celsius to Fahrenheit</title>
      <link>https://sourfox.khmersite.net/p/2025/06/converting-temperature/</link>
      <pubDate>Sun, 29 Jun 2025 17:35:11 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2025/06/converting-temperature/</guid>
      <description>&lt;h2 id=&#34;intro&#34;&gt;Intro&lt;/h2&gt;
&lt;p&gt;Ever needed to quickly convert Celsius to Fahrenheit right from your terminal? Look no further! I&amp;rsquo;ve put together a neat little command-line tool in Rust that does just that. It&amp;rsquo;s a great example of Rust&amp;rsquo;s simplicity and power for building practical utilities.&lt;/p&gt;
&lt;h3 id=&#34;what-it-does&#34;&gt;What It Does&lt;/h3&gt;
&lt;p&gt;This project is a straightforward temperature converter. You run it, input a temperature in Celsius, and it instantly spits out the equivalent in Fahrenheit. No fuss, no complex GUIs – just pure, efficient command-line goodness.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hi there!</title>
      <link>https://sourfox.khmersite.net/p/2025/05/hithere/</link>
      <pubDate>Sun, 11 May 2025 14:56:56 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2025/05/hithere/</guid>
      <description>&lt;p&gt;Hi there! Today, instead of writing another python program,  I had wrote a rust program. In this code, the goal was to ask for user&amp;rsquo;s name and then reply back.&lt;/p&gt;
&lt;p&gt;Requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ask for user name&lt;/li&gt;
&lt;li&gt;Replies back with &amp;lsquo;Hi, {name}, nice to meet you!&amp;rsquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The code:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;use std::io;

fn main() {
    println!(&amp;#34;What is your name?&amp;#34;);
    // Let&amp;#39;s variable &amp;#39;name&amp;#39; become mutable
    let mut name = String::new();
    match io::stdin().read_line(&amp;amp;mut name) {
        Ok(_) =&amp;gt; {
            //trims the string
            let trim1 = name.trim();
            println!(&amp;#34;Hi {}, nice to meet you.&amp;#34;, trim1);
        },
        Err(error) =&amp;gt; println!(&amp;#34;error: {error}&amp;#34;),
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s all! Hehehe. Bai bai.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Binary to Decimal Updated</title>
      <link>https://sourfox.khmersite.net/p/2025/01/binary_to_decimal_updated/</link>
      <pubDate>Tue, 28 Jan 2025 14:21:03 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2025/01/binary_to_decimal_updated/</guid>
      <description>&lt;p&gt;In my other blog post &amp;lsquo;Binary to Decimal&amp;rsquo;, I realized what if I had put in a different number than 1 and 0. I tried putting a 2 and the code still worked. So I will be sharing an updated version, so that you can only put in either 1 or 0. Else there will be an error.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# make a new function&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;bintodeci&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;reverse&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;len&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;total&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;index&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;reverse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;# if each number is either 0 or 1 else it&amp;#39;ll print out an error.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;01&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;total&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;])&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Error: Invalid binary number&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;None&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# return the value&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;total&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# In case I want to import it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sa&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;The variable __name__ is &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;n&#34;&gt;answer&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;bintodeci&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;111&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;answer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Recursive function</title>
      <link>https://sourfox.khmersite.net/p/2025/01/recursive_function/</link>
      <pubDate>Mon, 27 Jan 2025 17:53:36 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2025/01/recursive_function/</guid>
      <description>&lt;p&gt;Hi, today I&amp;rsquo;m sharing a recursive funtion in python. Recursive in python means the &amp;lsquo;def&amp;rsquo; function to call itself. The goal is to sum up the numbers to the number I want. For example, if I put in 3:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;1 + 2 + 3 = 6
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# def = makes a new function
def sum(num):
    # if we have an &amp;#39;if&amp;#39;, we should also have an &amp;#39;else&amp;#39;.
    if num == 0:
        return 0
    else:
        return sum(num - 1) + num


print(sum(2))
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Outcome:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Binary to Decimal</title>
      <link>https://sourfox.khmersite.net/p/2025/01/binary_to_decimal/</link>
      <pubDate>Thu, 23 Jan 2025 20:33:23 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2025/01/binary_to_decimal/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m sharing a program that converts binary to decimal in python.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# make a new function
def bintodeci(num):
    reverse = len(num) -1
    exp = 0
    total = 0
    # range(start, stop, step)
    for digit in range(reverse, -1, -1):
        total += int(num[digit]) * (2**exp)
        exp += 1
    
    # return the value
    return total


answer = bintodeci(&amp;#34;11&amp;#34;)
print(answer)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;sample output:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;10
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;bai.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create Restic Backup Program</title>
      <link>https://sourfox.khmersite.net/p/2024/12/create-restic-backup-program/</link>
      <pubDate>Mon, 30 Dec 2024 16:51:56 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/12/create-restic-backup-program/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m sharing a wrapper program written in python to backup my files in my device using restic.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;import subprocess

restic_command = [&amp;#39;restic&amp;#39;, &amp;#39;backup&amp;#39;]

backup = [&amp;#34;C:\\Users\\veronica\\ibisPaint&amp;#34;, &amp;#34;C:\\Users\\veronica\\Pictures&amp;#34;, &amp;#34;C:\\Users\\veronica\\Documents&amp;#34;]

print(&amp;#34;List of directories to be backed up:\n&amp;#34; )

#list the files that will be backed up.
#enumerate = allows you to keep track of the number of iterations in a loop.
for number, dir in enumerate(backup, start=1):
    print(f&amp;#34;    {number}. {dir}&amp;#34;)
#  Or: print(&amp;#34;    &amp;#34; + str(number) + &amp;#34;.&amp;#34;, letter )

# \n makes a new line
print(&amp;#34;\nBackup process started...\n&amp;#34;)

# combines the lists together.
backup_command = restic_command + backup

restic = subprocess.run(backup_command, shell=True)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The end. -w-&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a new user account on Linus Server Take 2</title>
      <link>https://sourfox.khmersite.net/p/2024/11/new-assignment/</link>
      <pubDate>Sat, 16 Nov 2024 11:29:08 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/11/new-assignment/</guid>
      <description>&lt;p&gt;Hallooo peeps! Last time, I made a new user on Linux but in this one, instead of just making a new user, I&amp;rsquo;ll alo be adding a name for the user and add it into the &amp;lsquo;wheel&amp;rsquo; group.&lt;/p&gt;
&lt;p&gt;Here are the requirements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Username: cooldonkey&lt;/li&gt;
&lt;li&gt;Password: awesomedonkey24&lt;/li&gt;
&lt;li&gt;Name of account: “Donkey”&lt;/li&gt;
&lt;li&gt;Group: &amp;lsquo;cooldonkey&amp;rsquo;, &amp;lsquo;wheel&amp;rsquo; (wheel group allows a user to run sudo command)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first thing I&amp;rsquo;ll do is making the user so we&amp;rsquo;ll use the &lt;strong&gt;sudo useradd&lt;/strong&gt;. But instead of just using &lt;strong&gt;useradd&lt;/strong&gt;, I&amp;rsquo;ll also add in an option called &lt;strong&gt;&amp;ndash;comment (-c)&lt;/strong&gt;. This will let me do number 3. Add a name for the user.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to make a new account on a Linux Server</title>
      <link>https://sourfox.khmersite.net/p/2024/11/new-account/</link>
      <pubDate>Fri, 08 Nov 2024 17:44:45 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/11/new-account/</guid>
      <description>&lt;p&gt;Hellooo! Let&amp;rsquo;s learn how to make a new account on a Linux Server.&lt;/p&gt;
&lt;p&gt;The first command we&amp;rsquo;ll be using is &amp;lsquo;useradd&amp;rsquo;. That command allows you to make a new account.&lt;/p&gt;
&lt;p&gt;This is how it goes:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo useradd test2&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now that the account username had been created. Now we have to make a password for it. To do that, we&amp;rsquo;ll use the command &amp;lsquo;sudo passwd (username)&amp;rsquo; Like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo passwd test2&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Atm Bill Dispenser</title>
      <link>https://sourfox.khmersite.net/p/2024/8/atm/</link>
      <pubDate>Fri, 09 Aug 2024 19:17:12 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/8/atm/</guid>
      <description>&lt;p&gt;Today, I was given an assignment to write a program to implement an atm dispenser in the following notes: 100, 50, 20, 10, and 5. If the amount is not a multiply of 5, the atm will return a list of 0.&lt;/p&gt;
&lt;p&gt;In the code are short explanations of why I used it.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# asks the customer to enter an amount of number.
atm = int(input(&amp;#34;Enter an amount in a multiple of 5: &amp;#34;))

# This takes in a amount parameter which is the input  from the user and return an array of bills in the following orders: [$100, $50, $20, $10, $5]. 
def dispenser(amount):
    
    # if statement to check if number entered is divisible by 5. If not, return with 0, if yes, continue code.
    if atm % 5 != 0:
        return [0, 0, 0, 0, 0]
    
    result = []
    bill_types = [100, 50, 20, 10, 5]

# starts with the starting amount being divided by each number in bill_types.
    for each_note in bill_types:
        note_counts = amount // each_note
        result.append(note_counts)

        # get the remainder and overwrite the previous.
        amount = amount % each_note

    return result

# The code below is what will be given back as a sentence to the customer.
print(f&amp;#34;You entered ${atm}: {dispenser(atm)}&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Finding the GCD of two numbers</title>
      <link>https://sourfox.khmersite.net/p/2024/7/assignment_gcd/</link>
      <pubDate>Fri, 12 Jul 2024 12:43:30 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/7/assignment_gcd/</guid>
      <description>&lt;p&gt;In this assignment, it&amp;rsquo;ll be finding the GCD(Greatest Common Divisor). This means I need to write a program to find the GCD of two numbers. Below, I have written the program and next to the hashtags are just a sentence that&amp;rsquo;ll explain to you what each part of the code is doing.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#The two variables &amp;#39;num&amp;#39; and &amp;#39;ber&amp;#39; will be where the inputs will be stored in. When it starts it will show &amp;#39;(num)a: &amp;#39; and you&amp;#39;ll have to put a number in. This goes the same for &amp;#39;(ber)b: &amp;#39;

num = int(input(&amp;#34;a: &amp;#34;))
ber = int(input(&amp;#34;b: &amp;#34;))

#Then once the variable has gotten their information, they will go through this: 

def gcd(num, ber):
    if ber == 0:
        return num
    else:
        return gcd(ber, num % ber)
    
#And last, it&amp;#39;ll gather their answer and print it for you as a sentence.

print(f&amp;#34;The GCD {num}, {ber} is {gcd(num, ber)}.&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s all today. Bye!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Check if a year is a leap year</title>
      <link>https://sourfox.khmersite.net/p/2024/5/assignment_9/</link>
      <pubDate>Tue, 14 May 2024 17:43:09 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/5/assignment_9/</guid>
      <description>&lt;p&gt;Today, I just got back to python after a few months. So when coming back, I got an assignment. My assignment was to &lt;em&gt;check if a year is a leap year.&lt;/em&gt; In the assignment, it also gave hints. These were the hints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A leap year is a calendar year that contains an additional day (February 29th) compared to a common year. It occurs once every four year.
s
&lt;strong&gt;This is how you can determine if a year is a leap year or not:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make a Frequency Dictionary From the Elements Of a List </title>
      <link>https://sourfox.khmersite.net/p/2024/2/assignment-8/</link>
      <pubDate>Sun, 25 Feb 2024 18:00:14 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/2/assignment-8/</guid>
      <description>&lt;p&gt;Halo! Today I have to make a python program that meets these conditions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Write a Python program that creates and print a dictionary that maps each element in a list to its corresponding frequency (how many times it occurs in the list).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The test should be case-sensitive. Therefore, “A” should not be considered the same element as “a”.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I think for today, I&amp;rsquo;m just going to make it short. Yea&amp;hellip;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Finding the Second Largest Value in a List</title>
      <link>https://sourfox.khmersite.net/p/2024/2/assignment-7/</link>
      <pubDate>Sat, 10 Feb 2024 19:35:52 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/2/assignment-7/</guid>
      <description>&lt;p&gt;Halooo! Today I&amp;rsquo;ll be teaching you how to find the second largest value in a list. The conditions -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Write a Python program that prints the second largest value in a list.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the list is empty or only has one element, print None.SSS&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To do this, we&amp;rsquo;ll have to make a list and then sort it and then we use the if statement and else.&lt;/p&gt;
&lt;p&gt;Input:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;lista = [1, 4, 8, 9, 100, 200, 30]
lista.sort()

if len(lista) &amp;gt; 1:
    print(lista[-2])
else:
    print(&amp;#34;None&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Output -&lt;/p&gt;</description>
    </item>
    <item>
      <title>Finding elements not in list</title>
      <link>https://sourfox.khmersite.net/p/2024/2/assignment-6/</link>
      <pubDate>Sun, 04 Feb 2024 21:14:07 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/2/assignment-6/</guid>
      <description>&lt;p&gt;Haloo people! How long has it been since I&amp;rsquo;ve done a blog post? Welp, I&amp;rsquo;ve finished my long break and now it&amp;rsquo;s time to get back to work. Today, I&amp;rsquo;ll be writing a python program that prints the elements of one list (a) that are not in the other list (b) as a list.&lt;/p&gt;
&lt;p&gt;My conditions are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If the lists have the same elements, it will print an empty list.&lt;/li&gt;
&lt;li&gt;If the first list (a) is an empty list, it&amp;rsquo;ll print an empty list.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;An example -&lt;/p&gt;</description>
    </item>
    <item>
      <title>Commas replaced by dots</title>
      <link>https://sourfox.khmersite.net/p/2023/12/switching-commas/</link>
      <pubDate>Tue, 26 Dec 2023 14:55:12 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/12/switching-commas/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been a long time since i&amp;rsquo;ve done a blog post. I wonder why&amp;hellip;.&lt;/p&gt;
&lt;p&gt;Welp, today I&amp;rsquo;ve got an assignment, today&amp;rsquo;s one is to write a python program that prints a version of the strings with all commas replaced by dots. Like this.&lt;/p&gt;
&lt;p&gt;Example -&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;  Input               Output
&amp;#34;Hello, World!&amp;#34;      &amp;#34;Hello. World!&amp;#34;
&amp;#34;725,000&amp;#34;            &amp;#34;725.000&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First, I&amp;rsquo;m going to do the 1st one. I&amp;rsquo;m going to assign it to a variable called string.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bonus assignment: Challenge Add a Key-Value Pair Only if the Key is Not in the Dictionary </title>
      <link>https://sourfox.khmersite.net/p/2023/11/dictionary/</link>
      <pubDate>Sat, 18 Nov 2023 18:51:34 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/11/dictionary/</guid>
      <description>&lt;p&gt;Today I was very bored so I checked my bonus assignments and I got this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Write a Python program that adds a new key-value pair to a dictionary only if the key doesn&amp;rsquo;t exist already.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the key-value pair exists in the dictionary, do not update the existing value. The dictionary should not be modified in this case.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Store the new key in the new_key variable and the new value in the new_value variable.
Print the final value of the dictionary.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Check if a Key Is in a Dictionary</title>
      <link>https://sourfox.khmersite.net/p/2023/11/check-if-a-key-is-in-a-dictionary/</link>
      <pubDate>Wed, 15 Nov 2023 20:31:21 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/11/check-if-a-key-is-in-a-dictionary/</guid>
      <description>&lt;p&gt;&lt;em&gt;The next one I&amp;rsquo;ll actually explain thoroughly.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So I had enough time to make another program. This time I had to meet the condtitions:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Write a Python program that checks if a key exists in a dictionary or not.
 
If the key exists in the dictionary, print True. Else, print False.

The key should be stored in the variable key.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is how I did it:&lt;/p&gt;
&lt;p&gt;Input:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;dict = {&amp;#34;toy&amp;#34;: &amp;#34;dino&amp;#34;, &amp;#34;sport&amp;#34;: &amp;#34;soccer&amp;#34;, &amp;#34;food&amp;#34;: &amp;#34;ramen&amp;#34;}
key = &amp;#34;toy&amp;#34;
if key in dict:
    print(True)
else:
    print(False)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Output:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Multiplication table</title>
      <link>https://sourfox.khmersite.net/p/2023/11/multiplication-table/</link>
      <pubDate>Wed, 15 Nov 2023 19:04:11 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/11/multiplication-table/</guid>
      <description>&lt;p&gt;Today I was very bored, and I decided to do programming! I&amp;rsquo;m going to make a multiplication table!&lt;/p&gt;
&lt;p&gt;What I&amp;rsquo;m going to to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Do input and int assigned to a variable&lt;/li&gt;
&lt;li&gt;Use while loop&lt;/li&gt;
&lt;li&gt;Use for loop&lt;/li&gt;
&lt;li&gt;Make it pretty&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;step-1&#34;&gt;Step 1:&lt;/h3&gt;
&lt;p&gt;First I&amp;rsquo;m going to make a variable called &amp;ldquo;num&amp;rdquo; and them use input to ask the person a question to grab info from. And I&amp;rsquo;m salso going to use &amp;ldquo;int&amp;rdquo; to make the string a integer.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assignment 5: Elements and Indices</title>
      <link>https://sourfox.khmersite.net/p/2023/11/assignment-5/</link>
      <pubDate>Sat, 11 Nov 2023 19:08:38 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/11/assignment-5/</guid>
      <description>&lt;p&gt;Today I had to do another assignment which is to create a python program which prints the elements of a list followed by their corresponding indices. Each element and its index must be on the same line seperated by a space. And if the list is empty, print &lt;strong&gt;&amp;ldquo;Empty List&amp;rdquo;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to make a list called num and put 1 to 4 inside.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;num = [1, 2, 3, 4]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then I&amp;rsquo;ll use the &lt;strong&gt;if&lt;/strong&gt; statement to do:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assignment 4: Checking if a list is empty</title>
      <link>https://sourfox.khmersite.net/p/2023/10/assignment-4/</link>
      <pubDate>Sun, 29 Oct 2023 18:42:54 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/10/assignment-4/</guid>
      <description>&lt;p&gt;I was given an assignment for the fourth time. My goal was to write a python program that checks if a list is empty or not. If the list is empty, then it&amp;rsquo;ll print &lt;strong&gt;empty&lt;/strong&gt;, if not, it&amp;rsquo;ll print &lt;strong&gt;not empty&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to start with an empty list.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;emp = []
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So that I can start the next step. I&amp;rsquo;m going to use&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;if statement&lt;/li&gt;
&lt;li&gt;len()&lt;/li&gt;
&lt;li&gt;else&lt;/li&gt;
&lt;li&gt;print()&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When using if, there must be a condition met. My condition is:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assignment 3: Doubling </title>
      <link>https://sourfox.khmersite.net/p/2023/10/assignment-3/</link>
      <pubDate>Wed, 18 Oct 2023 18:59:17 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/10/assignment-3/</guid>
      <description>&lt;p&gt;Today, I was given another assignment. (Which I wasn&amp;rsquo;t expecting.) Today&amp;rsquo;s assignment was to write a python program which had to meet the conditions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Write a Python proram that multiplies all the items in a list by the value of the variable factor.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The program must print the list as the output.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The program should allow multiplying the variable factor by a string in case the list contains strings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You may assume that the value of factor will be a positive integer.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assignment 1: Using Length and String</title>
      <link>https://sourfox.khmersite.net/p/2023/10/assignment-1-using-length/</link>
      <pubDate>Sun, 15 Oct 2023 11:14:44 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/10/assignment-1-using-length/</guid>
      <description>&lt;p&gt;Today, I was given an assignment. My assignment wanted me to write a Python program that pints the length of a string.&lt;/p&gt;
&lt;p&gt;This is what I had to print out:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;The length of &amp;#34;&amp;#34; is 0.
The length of &amp;#34;H&amp;#34; is 1.
The length of &amp;#34;Hello&amp;#34; is 5.
The length of &amp;#34;Amazing&amp;#34; is 7.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To do this, I have a plan in my mind which is:&lt;/p&gt;
&lt;p&gt;Step 1. Find out what I&amp;rsquo;m going to use.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assignment 2: Python Using Lists and While-Loop</title>
      <link>https://sourfox.khmersite.net/p/2023/10/assignment-2-python-using-lists-while-loop/</link>
      <pubDate>Sat, 07 Oct 2023 12:43:22 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/10/assignment-2-python-using-lists-while-loop/</guid>
      <description>&lt;p&gt;I had an assignment that I was given for Python. What I have to do is to write a program in Python that asks a user to enter their favourite fruit, store each fruit in a list. At the end of the program, print out the total number of fruits, and also print all the fruits.&lt;/p&gt;
&lt;p&gt;This is what I&amp;rsquo;m expected:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;What is your favourite fruit? Banana (the fruit user put)
What is your favourite fruit? Apple  (the fruit user put)
What is your favourite fruit? Orange  (the fruit user put)
What is your favourite fruit? (empty) (the user didn&amp;#39;t write anything)

You have 3 fruits in the basket: Banana, Apple, and Orange.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So how do I do this?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Display Items in Python List</title>
      <link>https://sourfox.khmersite.net/p/2023/10/display-items-in-python-list/</link>
      <pubDate>Mon, 02 Oct 2023 16:44:02 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/10/display-items-in-python-list/</guid>
      <description>&lt;p&gt;Today, I was asked to write a small python code to print out all items in a list with comma seperated. The last item would end the with a &amp;lsquo;dot&amp;rsquo;, or full stop.&lt;/p&gt;
&lt;p&gt;For example, here is a list of sports:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sports&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;basketball&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;soccer&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;netball&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And I was asked to print out the expected output:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;My&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;favourite&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sports&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;are&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;basketball&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;soccer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;netball&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But how do I do this? Today, I&amp;rsquo;ll be showing you how to show the expected output using &lt;strong&gt;join&lt;/strong&gt; and without join.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello World</title>
      <link>https://sourfox.khmersite.net/p/2023/9/hello-world/</link>
      <pubDate>Sat, 30 Sep 2023 19:16:02 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2023/9/hello-world/</guid>
      <description>&lt;p&gt;Hello World! Today, Sour Fox site has been born!&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
