<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Blended Learning 2 by Lee Zhi Yang</title>
      <link>https://padlet.com/zhiyang31/tsh6lq43x243</link>
      <description>C++ to Python</description>
      <language>en-us</language>
      <pubDate>2019-05-03 13:10:14 UTC</pubDate>
      <lastBuildDate>2026-01-30 17:25:03 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>While loop (C++)</title>
         <author>zhiyang31</author>
         <link>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356582657</link>
         <description><![CDATA[<div>#include&lt;iostream&gt;<br>#include&lt;iomanip&gt;<br>using namespace std;<br><br>int main()<br>{<br>    int hours;<br>    char name[20];<br>    float pay, EPF, grosspay;<br><br>    cout&lt;&lt;"Hourly pay rate is RM 25.00"&lt;&lt;endl&lt;&lt;endl;<br><br>    int i=1;<br>    while(i&lt;=5){<br>        cout&lt;&lt;"Name: ";<br>        cin.ignore();<br>        cin.getline(name,20);<br>        cout&lt;&lt;"Hours you have worked this week: ";<br>        cin&gt;&gt;hours; cout&lt;&lt;endl;<br><br>        if(hours&gt;50){<br>            cout&lt;&lt;"You have worked extra "&lt;&lt;hours-50&lt;&lt;" hours."&lt;&lt;endl;<br>            pay=25*(50+1.5*(hours-50));<br>            cout&lt;&lt;fixed&lt;&lt;showpoint; cout&lt;&lt;setprecision(2);<br>            cout&lt;&lt;"Income payment this week: RM "&lt;&lt;pay&lt;&lt;endl;<br>            EPF=0.11*pay;<br>            cout&lt;&lt;"EPF: RM "&lt;&lt;EPF&lt;&lt;endl;<br>            grosspay=pay-EPF;<br>            cout&lt;&lt;"Gross pay: RM "&lt;&lt;grosspay&lt;&lt;endl;<br>        }<br>        else{<br>            pay=hours*25;<br>            cout&lt;&lt;fixed&lt;&lt;showpoint; cout&lt;&lt;setprecision(2);<br>            cout&lt;&lt;"Income payment this week: RM "&lt;&lt;pay&lt;&lt;endl;<br>            EPF=0.11*pay;<br>            cout&lt;&lt;"EPF: RM "&lt;&lt;EPF&lt;&lt;endl;<br>            grosspay=pay-EPF;<br>            cout&lt;&lt;"Gross pay: RM "&lt;&lt;grosspay&lt;&lt;endl;<br>        }<br>        cout&lt;&lt;endl; cout&lt;&lt;"------------------------------------"&lt;&lt;endl;<br>        i=i+1;<br>    }<br>}<br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/378400147/593be89f941858e752f0f1e3e9415110/Capture.png" />
         <pubDate>2019-05-03 13:13:44 UTC</pubDate>
         <guid>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356582657</guid>
      </item>
      <item>
         <title>While loop (Python)</title>
         <author>zhiyang31</author>
         <link>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356582948</link>
         <description><![CDATA[<div>print("Hourly pay rate is RM 25.00")</div><div>i = 1</div><div>while i &lt;= 5:</div><div>    name = input("Name: ")</div><div>    hours = input("Hours you have worked this week: ")</div><div>    if int(hours) &gt; 50:</div><div>        print("You have worked extra " + str(int(hours)-50) + " hours.")</div><div>        pay = 25.0 * (50.0 + 1.5 * (float(hours) - 50.0))</div><div>        print("Income payment this week: RM " + str("%.2f" % float(pay)))</div><div>        EPF = 0.11 * float(pay)</div><div>        print("EPF: RM " + str("%.2f" % float(EPF)))</div><div>        grosspay = pay - EPF</div><div>        print("Gross pay: RM " + str("%.2f" % float(grosspay)))</div><div>    else:</div><div>        pay = int(hours) * 25</div><div>        print("Income payment this week: RM " + str("%.2f" % float(pay)))</div><div>        EPF = 0.11 * float(pay)</div><div>        print("EPF: RM " + str("%.2f" % float(EPF)))</div><div>        grosspay = pay - EPF</div><div>        print("Gross pay: RM " + str("%.2f" % float(grosspay)))</div><div>    print("\n" + "---------------------------------------------")</div><div>    i = i + 1</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/378400147/6988e0fe5c3e5f27d7af2f5def9287c1/Capture1.png" />
         <pubDate>2019-05-03 13:14:22 UTC</pubDate>
         <guid>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356582948</guid>
      </item>
      <item>
         <title>Do while loop ( C++ )</title>
         <author></author>
         <link>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356603531</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;</div><div>#include &lt;iomanip&gt;</div><div>#include &lt;cmath&gt;</div><div><br></div><div>using namespace std;</div><div><br></div><div>int main()</div><div>{</div><div>char name [20];</div><div>int i=1;</div><div><br></div><div>float hours;</div><div>float pay;</div><div>float epf;</div><div>float grosspay;</div><div><br></div><div>do</div><div>{</div><div>  cout&lt;&lt;"Enter your name: ";</div><div>  cin.ignore();</div><div>  cin.getline(name,20);</div><div>  cout&lt;&lt;"Enter your work hours:";</div><div>  cin&gt;&gt;hours;</div><div><br></div><div>  if (hours &lt;= 50)</div><div>    {</div><div>        pay = hours * 25;</div><div>        cout&lt;&lt;fixed&lt;&lt;showpoint; </div><div>        cout&lt;&lt;setprecision(2);</div><div>        epf = 0.11 * pay;</div><div>        grosspay = pay - epf;</div><div>        cout&lt;&lt;"Pay = RM"&lt;&lt;pay&lt;&lt;endl;</div><div>        cout&lt;&lt;"EPF = RM"&lt;&lt;epf&lt;&lt;endl;</div><div>        cout&lt;&lt;"Grosspay = RM"&lt;&lt;grosspay&lt;&lt;endl;</div><div>        cout&lt;&lt;"------------------------------------------------"&lt;&lt;endl;</div><div>    }</div><div>    else</div><div>    {</div><div>        cout&lt;&lt;"You have worked extra "&lt;&lt;hours-50&lt;&lt;" hours."&lt;&lt;endl;</div><div>        pay=25*(50+1.5*(hours-50));</div><div>        cout&lt;&lt;fixed&lt;&lt;showpoint; </div><div>        cout&lt;&lt;setprecision(2);</div><div>        epf = 0.11 * pay;</div><div>        grosspay = pay - epf;</div><div>        cout&lt;&lt;"Pay = RM"&lt;&lt;pay&lt;&lt;endl;</div><div>        cout&lt;&lt;"EPF = RM"&lt;&lt;epf&lt;&lt;endl;</div><div>        cout&lt;&lt;"Grosspay = RM"&lt;&lt;grosspay&lt;&lt;endl;</div><div>        cout&lt;&lt;"------------------------------------------------"&lt;&lt;endl;</div><div>    }</div><div>  i++;</div><div>}while(i&lt;6);</div><div><br></div><div>return 0;</div><div>}</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/378670289/f030e9bea4f9fa70540570b09ea85cd5/python.png" />
         <pubDate>2019-05-03 14:01:14 UTC</pubDate>
         <guid>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356603531</guid>
      </item>
      <item>
         <title>For Loop ( C++ )</title>
         <author></author>
         <link>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356655790</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;iomanip&gt;<br>using namespace std;<br> <br>int main()<br>{<br>int i = 1 ;<br>char name [20];<br>int hours;<br>float pay,grosspay,epf;<br> <br><br>cout&lt;&lt;"Hi "&lt;&lt;endl;<br>cout&lt;&lt;"Hourly pay rate is RM25.00"&lt;&lt;endl;<br>for (int i = 1; i &lt;= 5 ; i = i+1)<br>{<br>    cout&lt;&lt;"Enter your name : ";<br>    cin.ignore();<br>    cin.getline(name,20);<br>    cout&lt;&lt;"Enter your working hours : ";<br>    cin&gt;&gt;hours;<br>    if (hours &lt;= 50)<br>    {<br>        pay = hours * 25;<br>        cout&lt;&lt;fixed&lt;&lt;showpoint; <br>        cout&lt;&lt;setprecision(2);<br>        epf = 0.11 * pay;<br>        grosspay = pay - epf;<br>        cout&lt;&lt;"Pay = RM"&lt;&lt;pay&lt;&lt;endl;<br>        cout&lt;&lt;"EPF = RM"&lt;&lt;epf&lt;&lt;endl;<br>        cout&lt;&lt;"Grosspay = RM"&lt;&lt;grosspay&lt;&lt;endl;<br>        cout&lt;&lt;"------------------------------------------------"&lt;&lt;endl;<br>    }<br>    else<br>    {<br>        cout&lt;&lt;"You have worked extra "&lt;&lt;hours-50&lt;&lt;" hours."&lt;&lt;endl;<br>        pay=25*(50+1.5*(hours-50));<br>        cout&lt;&lt;fixed&lt;&lt;showpoint; <br>        cout&lt;&lt;setprecision(2);<br>        epf = 0.11 * pay;<br>        grosspay = pay - epf;<br>        cout&lt;&lt;"Pay = RM"&lt;&lt;pay&lt;&lt;endl;<br>        cout&lt;&lt;"EPF = RM"&lt;&lt;epf&lt;&lt;endl;<br>        cout&lt;&lt;"Grosspay = RM"&lt;&lt;grosspay&lt;&lt;endl;<br>        cout&lt;&lt;"------------------------------------------------"&lt;&lt;endl;<br>    }<br>}<br>return 0;<br>}</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/378400147/7a6a6bb839bb37807752dd4355946b5d/Capture2.png" />
         <pubDate>2019-05-03 15:51:20 UTC</pubDate>
         <guid>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356655790</guid>
      </item>
      <item>
         <title>For Loop (Python)</title>
         <author>eugenetan904</author>
         <link>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356800597</link>
         <description><![CDATA[<div>print ('Hi')<br>print ('The Hourly pay rate is RM25.00')<br>i=1<br>for i in range (5):<br>    name = input ("Enter Your Name: ")<br>    hours = input ("Enter Your Working Hours: ")<br>    if int(hours)&gt;50:<br>        print ("You have worked extra "+str(int(hours)-50)+" hours")<br>        pay = 25.0 * (50.0 + 1.5 * (float(hours) - 50.0))<br>        print("Pay = RM " + str("%.2f" % float(pay)))<br>        EPF = 0.11 * float(pay)<br>        print("EPF = RM " + str("%.2f" % float(EPF)))<br>        grosspay = pay - EPF<br>        print("Gross pay = RM " + str("%.2f" % float(grosspay)))<br>    else:<br>        pay = int(hours) * 25<br>        print("Pay = RM " + str("%.2f" % float(pay)))<br>        EPF = 0.11 * float(pay)<br>        print("EPF = RM " + str("%.2f" % float(EPF)))<br>        grosspay = pay - EPF<br>        print("Gross pay = RM " + str("%.2f" % float(grosspay)))<br>    print ("---------------------------------")<br>    i+=1</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/378670289/32c5a715fbc2d9c2d773ed07fcd93219/python.png" />
         <pubDate>2019-05-04 06:22:42 UTC</pubDate>
         <guid>https://padlet.com/zhiyang31/tsh6lq43x243/wish/356800597</guid>
      </item>
   </channel>
</rss>
