<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>IS111 Week 2 In-class Exercises (Q5-8) by Michelle Kan</title>
      <link>https://padlet.com/michellekan/week2b</link>
      <description>Share your solutions</description>
      <language>en-us</language>
      <pubDate>2022-01-19 01:44:17 UTC</pubDate>
      <lastBuildDate>2022-01-24 08:34:29 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f331.png</url>
      </image>
      <item>
         <title>Chan Yi Xuan</title>
         <author>yixuanchan20181</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000111686</link>
         <description><![CDATA[<div>a)<br><br>import math</div><div><br></div><div>size = float(input("What's the size of the square (in square centimeters)? "))</div><div>side = math.sqrt(size)</div><div>print(f'Each side of this square is {str(side)} centimeters.')<br><br>b)<br>import random</div><div><br></div><div>num = int(input("Enter a positive integer: "))</div><div>rand_num = random.randint(1, num)</div><div>print(rand_num)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:56:03 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000111686</guid>
      </item>
      <item>
         <title>Q5</title>
         <author>yizheng2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000111958</link>
         <description><![CDATA[<div>#5a<br>import math</div><div>area = float(input("What's the size of the square (in square centimeters)? "))</div><div>side = math.sqrt(area)</div><div><br></div><div>print(f'Each side of this square is {side} centimeters.')<br><br>#5b<br>import random</div><div>n = int(input("Enter a positive integer: "))</div><div>rand_num = random.randint(1,n)</div><div>print(rand_num)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:56:14 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000111958</guid>
      </item>
      <item>
         <title>Valerie Lai</title>
         <author>valerielai2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000112510</link>
         <description><![CDATA[<div>5a<br><br>import math</div><div><br></div><div>area = int (input("What's the size of the square (in square centimeters)?"))</div><div>length = math.sqrt(area)</div><div>print (f"Each side of this square is {length} centimeters")<br><br>5b<br>import random</div><div>integer = int(input("Enter a positive integer:"))</div><div>print(random.randint(1, integer))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:56:35 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000112510</guid>
      </item>
      <item>
         <title>Valerie Lai</title>
         <author>valerielai2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000113015</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age?"))</div><div>gender = input("What's your gender [M|F]?")</div><div><br></div><div>print (f"Your premium is ${week2_utility.get_insurance_premium(age, gender)}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:56:50 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000113015</guid>
      </item>
      <item>
         <title>Valerie Lai</title>
         <author>valerielai2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000113289</link>
         <description><![CDATA[<div>input = int(input_str)</div><div>num_days = input//(60*60*24)</div><div>num_hours = input%(60*60*24) //(60*60)</div><div>num_minutes = input%(60*60) //60</div><div>num_seconds = input%60</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:57:02 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000113289</guid>
      </item>
      <item>
         <title>Q6</title>
         <author>yizheng2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000113382</link>
         <description><![CDATA[<div>import week2_utility</div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div><br></div><div>print(f"Your premium is ${premium}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:57:05 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000113382</guid>
      </item>
      <item>
         <title>Chan Yi Xuan</title>
         <author>yixuanchan20181</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000113899</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>premium = week2_utility.get_insurance_premium(age, gender)</div><div>print("Your premium is $" + str(premium))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:57:27 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000113899</guid>
      </item>
      <item>
         <title>Grace Ang</title>
         <author>graceang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000113905</link>
         <description><![CDATA[<div>a)&nbsp;<br><br>import math</div><div>area = float(input("What's the size of the square ( in square centimeters?) "))</div><div>side_of_sq = math.sqrt(area)</div><div>print("Each side of this square is ", side_of_sq,"centimeters.")<br><br>b)&nbsp;<br><br>import random</div><div>user_num = int(input("Enter a positive integer: "))</div><div>random_number = random.randint(1,user_num)</div><div>print(random_number)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:57:27 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000113905</guid>
      </item>
      <item>
         <title>Fahrulia Rahmania F</title>
         <author>fahruliaf20211</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000114010</link>
         <description><![CDATA[<div>5a<br>import math<br><br>size = float(input("What's the size of the square (in square centimeter)?<br>print("Each side of this square is", + math.sqrt(size), 'centimeters.')<br><br>5b<br>import random<br><br>user_input = int(input("Enter a positive integer: "))&nbsp;<br>print(random.randrange(user_input))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:57:33 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000114010</guid>
      </item>
      <item>
         <title>Grace Ang</title>
         <author>graceang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000114703</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div>print("Your premium is $",premium)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:58:01 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000114703</guid>
      </item>
      <item>
         <title>Q7</title>
         <author>yizheng2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000114714</link>
         <description><![CDATA[<div>input_str = int(input('Please enter the system time (in seconds): '))<br><br>num_days = 0</div><div>num_hours = 0</div><div>num_minutes = 0</div><div>num_seconds = 0</div><div><br></div><div># Put your code below</div><div>days = input_str//86400</div><div>num_days += days</div><div><br></div><div>hours = input_str%86400&nbsp;</div><div>num_hours += (hours//3600)</div><div><br></div><div>minutes = hours%3600</div><div>num_minutes += (minutes//60)</div><div><br></div><div>seconds = minutes%60</div><div>num_seconds += seconds<br><br>print('Based on this system time, ' + str(num_days) + ' days, ' + str(num_hours) + ' hours, ' + str(num_minutes) + ' minutes and ' + str(num_seconds) + ' seconds have passed since 1 January 1970 00:00:00 UT.')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:58:01 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000114714</guid>
      </item>
      <item>
         <title>Fahrulia Rahmania F.</title>
         <author>fahruliaf20211</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000114803</link>
         <description><![CDATA[<div>from week2_utility import get_insurance_premiumadsas<br><br>age = int(input("What's your age? "))<br>gender = input("What's your gender [M]/[F]? ")<br><br>print("Your premium is: $",get_insurance_premium(age,gender))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:58:05 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000114803</guid>
      </item>
      <item>
         <title>Matthew</title>
         <author>matthewtee2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000116666</link>
         <description><![CDATA[<div>Q5a:<br><br>import math</div><div><br></div><div>size = float(input("What's the size of the square (in square centimeters)? "))</div><div>side = math.sqrt(size)</div><div><br></div><div>print("Each side of the square is", side, "centimeters.")<br><br>Q5b:<br><br>import random</div><div><br></div><div>integer = int(input("Enter a positive integer: "))</div><div>print(random.randint(0, integer))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 10:59:34 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000116666</guid>
      </item>
      <item>
         <title>Grace Ang</title>
         <author>graceang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000118773</link>
         <description><![CDATA[<div>num = int(input_str)</div><div><br></div><div>num_seconds = num % 60</div><div><br></div><div># num below is the remaining number of minutes (after num_seconds above is excluded)</div><div>num = num // 60</div><div><br></div><div>num_minutes = num % 60</div><div><br></div><div># num below is the remaining number of hours (after num_minutes above is excluded)</div><div>num = num // 60</div><div><br></div><div>num_hours = num % 24</div><div><br></div><div>num_days = num // 24</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:01:14 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000118773</guid>
      </item>
      <item>
         <title>Grace Ang</title>
         <author>graceang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000119861</link>
         <description><![CDATA[<div>a) return (income - 20000) * 0.02<br>b) return max( (income - 20000) * 0.02, 0.0)<br>c) return max( (income - 30000) * (0.035 - 0.02), 0.0 ) + max( (income - 20000) * 0.02, 0.0 )</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:02:02 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000119861</guid>
      </item>
      <item>
         <title>Chan Yi Xuan</title>
         <author>yixuanchan20181</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000120664</link>
         <description><![CDATA[<div>num_secs_per_min = 60</div><div>num_secs_per_hour = 60 * 60</div><div>num_secs_per_day = 60 * 60 * 24</div><div><br></div><div>total_num_secs = int(input_str)</div><div><br></div><div># Get the number of days first, then find the remainder</div><div>num_days = total_num_secs // num_secs_per_min&nbsp;</div><div>num_secs_left = total_num_secs % num_secs_per_day</div><div><br></div><div># With the remainder from above, find the number of hours</div><div>num_hours = num_secs_left // num_secs_per_hour</div><div>num_secs_left = num_secs_left % num_secs_per_hour</div><div><br></div><div># With the final remainder, find the number of seconds</div><div>num_minutes = num_secs_left // num_secs_per_min</div><div>num_seconds = num_secs_left % num_secs_per_min</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:02:35 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000120664</guid>
      </item>
      <item>
         <title>8</title>
         <author>kangweimah2018</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000120864</link>
         <description><![CDATA[<div>8a)<br>return (income-20000)*0.02<br><br>8b)&nbsp;<br>return max(income-20000,0) * 0.02<br><br>8c)&nbsp;<br>return min(max(income - 20000,0), 10000) * 0.02 + max(income - 30000, 0) * 0.035</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:02:45 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000120864</guid>
      </item>
      <item>
         <title>Q8</title>
         <author>yizheng2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000120969</link>
         <description><![CDATA[<div>#8a<br>def calculate_tax_1(income):<br>&nbsp; &nbsp; tax = (income-20000) * 0.02</div><div>&nbsp; &nbsp; return tax<br><br>#8b<br>def calculate_tax_2(income):<br>&nbsp; &nbsp; tax_income = max(income-20000, 0)</div><div>&nbsp; &nbsp; tax = tax_income * 0.02</div><div>&nbsp; &nbsp; return tax<br><br>#8c<br>def calculate_tax_2(income):<br>&nbsp; &nbsp; Bracket2 = max(income-30000,0)</div><div>&nbsp; &nbsp; Bracket1 = max(income-20000,0)</div><div>&nbsp; &nbsp; tax = Bracket2*(0.035-0.02) + Bracket1*0.02</div><div>&nbsp; &nbsp; return tax</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:02:50 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000120969</guid>
      </item>
      <item>
         <title>Q7</title>
         <author>kangweimah2018</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000121787</link>
         <description><![CDATA[<div>num_days = input_str//(60*60*24)</div><div>num_hours = (input_str - 60*60*24*num_days) // (60*60)</div><div>num_minutes = (input_str - 60*60*24*num_days - 60*60*num_hours) // 60</div><div>num_seconds = input_str - 60*60*24*num_days - 60*60*num_hours - 60*num_minutes</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:03:27 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000121787</guid>
      </item>
      <item>
         <title>Q6</title>
         <author>kangweimah2018</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000122703</link>
         <description><![CDATA[<div>import week2_utilityimport stringage = float(input('What is your age?'))gender = input('What is your gender (M/F)?')print(f'Your premium is ${week2_utility.get_insurance_premium(age, gender.upper())}')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:04:08 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000122703</guid>
      </item>
      <item>
         <title>Darren</title>
         <author>darrentann</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000124704</link>
         <description><![CDATA[<div>a)<br>import math</div><div><br></div><div>size = float(input("What's the size of the square (in square centimeters)"))</div><div><br></div><div>side = math.sqrt(size)</div><div>print(f'Each side of this square is {side} centimeters')<br><br>b)<br>import random</div><div><br></div><div>number = int(input("Enter a positive integer: "))</div><div><br></div><div>print (random.randint(1, number))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:05:35 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000124704</guid>
      </item>
      <item>
         <title>Q6</title>
         <author>darrentann</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000125534</link>
         <description><![CDATA[<div>age = int(input("What is your age?: "))</div><div>gender = input('What is your gender [M|F]?: ')</div><div><br></div><div>import week2_utility</div><div>insurance = week2_utility.get_insurance_premium(age, gender)</div><div><br></div><div>print(f'Your premium is ${insurance} ')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:06:13 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000125534</guid>
      </item>
      <item>
         <title>Q7</title>
         <author>darrentann</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000126574</link>
         <description><![CDATA[<div>num_days = int(input_str) // 86400&nbsp;</div><div>remainder = int(input_str) % 86400</div><div><br></div><div>num_hours = remainder // 3600</div><div>remainder = remainder % 3600</div><div><br><br></div><div>num_minutes = remainder // 60</div><div>remainder = remainder % 60</div><div><br><br></div><div>num_seconds = remainder&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:07:02 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000126574</guid>
      </item>
      <item>
         <title>Guang Guo</title>
         <author>GuangGuo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000127259</link>
         <description><![CDATA[<div>a)<br>import math</div><div><br></div><div>size = int(input("What's the size of the square (in sqaure centimeters?"))</div><div>length = math.sqrt(size)&nbsp;</div><div><br></div><div>print(f'Each side of this square is {length} centimeters.')<br><br>b)<br>import random</div><div><br></div><div>n = int(input('Enter a positive integer:'))</div><div><br></div><div>print(random.randrange(1,n))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:07:28 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000127259</guid>
      </item>
      <item>
         <title>Guang Guo</title>
         <author>GuangGuo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000127677</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age?"))</div><div>gender = input("What's your gender [M|F]?")</div><div><br></div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div><br></div><div>print(f'Your premium is ${premium}')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:07:38 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000127677</guid>
      </item>
      <item>
         <title>Chan Yi Xuan</title>
         <author>yixuanchan20181</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000127844</link>
         <description><![CDATA[<div>a)<br># Need to minus the lower bound ($20,000) to calculate the tax of $5000<br>return (income - 20000) * 0.02<br><br>b)<br># Reason is same as above. In the case where the income is less than $20,000, the max function selects 0 automatically.<br>return max( (income - 20000) * 0.02, 0.0)<br><br>c)&nbsp;</div><div>return max((income - 30000) * (0.035 - 0.02), 0.0)<br>+ max((income - 20000) * 0.02, 0.0)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:07:43 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000127844</guid>
      </item>
      <item>
         <title>Daiyana</title>
         <author>daiyanadanisyah1</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000133064</link>
         <description><![CDATA[<div>a)&nbsp;<br>import math</div><div><br></div><div>area = float(input("What's the size of the square (in square centimeters)? "))</div><div>side = math.sqrt(area)</div><div>print(f"Each side of this square is {side} centimeters.")<br><br>b)<br>import random</div><div><br></div><div>n = int(input("Enter a positive integer: "))</div><div>rand_num = random.randrange(n)</div><div>print(rand_num)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:11:16 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000133064</guid>
      </item>
      <item>
         <title>Daiyana</title>
         <author>daiyanadanisyah1</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000133362</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>insurance_amt = week2_utility.get_insurance_premium(age, gender)</div><div>print(f"Your premium is ${insurance_amt}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:11:28 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000133362</guid>
      </item>
      <item>
         <title>Regin Ng</title>
         <author>regin_ng_2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000171404</link>
         <description><![CDATA[<div>Qns 5a<br><br>import math&nbsp;</div><div><br></div><div>size = float(input("What's the size of the square (in square cm) : "))</div><div>side = math.sqrt(size)</div><div><br></div><div>print(f"Each side of the square is {side} cm.")<br><br>Qns 5b<br><br>import random</div><div><br></div><div>num = int(input("Enter a positive integer : "))</div><div>ran_num = random.randint(1,num)</div><div><br></div><div>print(ran_num)</div><div><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:37:51 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000171404</guid>
      </item>
      <item>
         <title>Regin Ng</title>
         <author>regin_ng_2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000171938</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M][F] ? ")</div><div>premium = week2_utility.get_insurance_premium(age, gender)</div><div><br></div><div>print(f"Your premium is ${premium}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:38:11 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000171938</guid>
      </item>
      <item>
         <title>Regin Ng</title>
         <author>regin_ng_2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000172771</link>
         <description><![CDATA[<div>num_days = int(input_str) // 86400</div><div>num_hours = int(input_str) % 86400 // 3600</div><div>num_minutes = int(input_str) % 3600 // 60</div><div>num_seconds = int(input_str) % 3600 % 60</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 11:38:42 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000172771</guid>
      </item>
      <item>
         <title></title>
         <author>rynetan2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000245833</link>
         <description><![CDATA[<div>import math</div><div><br></div><div>a = float(input("What's the size of the square (in square centimetres)? "))</div><div>b = math.sqrt(a)</div><div>print(f'Each side of this square is {b} centimeters.')<br><br>import random</div><div><br></div><div>n = int(input("Enter a postitive integer: "))</div><div><br></div><div>print(random.randint(1,n))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:27:59 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000245833</guid>
      </item>
      <item>
         <title></title>
         <author>rynetan2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000246289</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>a = int(input("What's your age? "))</div><div>b = input("What's your gender [M][F]? ")</div><div><br></div><div>print(f'Your premium is ${week2_utility.get_insurance_premium(a,b)}')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:28:19 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000246289</guid>
      </item>
      <item>
         <title></title>
         <author>rynetan2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000248164</link>
         <description><![CDATA[<div>num_days = 0</div><div>num_hours = 0</div><div>num_minutes = 0</div><div>num_seconds = 0</div><div><br></div><div># Put your code below</div><div>a = 24*60*60</div><div>b = 60*60</div><div>c = 60</div><div>d = 1</div><div><br></div><div>x = int(input_str)</div><div><br></div><div>num_days =  x//a</div><div>num_hours = ((x%a)//b)</div><div>num_minutes = (((x%a)%b)//c)</div><div>num_seconds = (((x%a)%b)%c)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:29:28 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000248164</guid>
      </item>
      <item>
         <title>Jon Tiong</title>
         <author>jontiong2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000250358</link>
         <description><![CDATA[<div>a)import math</div><div><br></div><div>area = float(input("What's the size of the square (in square centimeters)?" ))</div><div>side =math.sqrt(area)</div><div>print(f"Each side of this square is {side} centimeters.")<br><br>b)import random</div><div><br></div><div>num1= int(input("Enter a positive integer: "))</div><div>print(random.randrange(1, num1 + 1))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:30:45 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000250358</guid>
      </item>
      <item>
         <title>Jon Tiong</title>
         <author>jontiong2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000251951</link>
         <description><![CDATA[<div>from week2_utility import get_insurance_premium</div><div>age = float(input("What is your age? "))</div><div>gender = str(input("what is your gender [M][F] "))</div><div><br></div><div>premium = get_insurance_premium(age, gender)</div><div>print(f"Your premium is ${premium}")</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:31:45 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000251951</guid>
      </item>
      <item>
         <title>Jon Tiong</title>
         <author>jontiong2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000252684</link>
         <description><![CDATA[<div>time = int(input_str)</div><div>DAY_SECONDS = 86400</div><div>HOUR_SECONDS = 3600</div><div>MINUTE_SECONDS = 60</div><div>num_days = time // DAY_SECONDS</div><div>time_remaining = time - num_days * DAY_SECONDS</div><div><br></div><div>num_hours = time_remaining // HOUR_SECONDS</div><div>time_remaining = time_remaining - num_hours * HOUR_SECONDS</div><div><br></div><div>num_minutes = time_remaining // MINUTE_SECONDS</div><div>time_remaining = time_remaining - num_minutes * MINUTE_SECONDS</div><div><br></div><div>num_seconds = time_remaining</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:32:09 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000252684</guid>
      </item>
      <item>
         <title>Seah Yu Xuan</title>
         <author></author>
         <link>https://padlet.com/michellekan/week2b/wish/2000299087</link>
         <description><![CDATA[<div>(a)<br>import math<br><br>sqsize = int(input("What's the size of the square (in square centimeters) ? "))<br><br>print('Each side of this square is', float(math.sqrt(sqsize)), 'centimeters')<br><br>(b)<br>import random<br><br>integer = int(input('Enter a positive integer: '))<br><br>print(random.randint(1,integer)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 12:57:06 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000299087</guid>
      </item>
      <item>
         <title>Seah Yu Xuan</title>
         <author></author>
         <link>https://padlet.com/michellekan/week2b/wish/2000310776</link>
         <description><![CDATA[<div>import week2_utility<br><br>age = int(input("What's your age? "))<br>gender = str(input("What's your gender [M|F]? "))<br>print('Your premium is $'+str(week2_utility.get_insurance_premium(age,gender)))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:02:50 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000310776</guid>
      </item>
      <item>
         <title>Jon Tiong</title>
         <author>jontiong2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000322014</link>
         <description><![CDATA[<div>a) bracket = 20000</div><div>&nbsp; &nbsp; tax = (income - bracket )* 0.02&nbsp;</div><div>&nbsp; &nbsp; return tax<br><br>b)BRACKET = 20000</div><div>&nbsp; &nbsp; TAX_RATE = 0.02</div><div>&nbsp; &nbsp; tax = (max(BRACKET, income) - BRACKET) * TAX_RATE</div><div>&nbsp; &nbsp; return tax<br><br>c)<br>BRACKET1 = 20000</div><div>&nbsp; &nbsp; TAX_RATE1 = 0.02</div><div><br></div><div>&nbsp; &nbsp; BRACKET2 = 30000</div><div>&nbsp; &nbsp; TAX_RATE2 = 0.035</div><div><br></div><div>&nbsp; &nbsp; tax = (max(BRACKET2, income) - BRACKET2) * TAX_RATE2 + (max(BRACKET1, min(income, BRACKET2)) - BRACKET1) * TAX_RATE1</div><div>&nbsp; &nbsp; return tax</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:08:02 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000322014</guid>
      </item>
      <item>
         <title></title>
         <author>weizhelim2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000345950</link>
         <description><![CDATA[<div>(a)<br>import math</div><div><br></div><div>area=int(input("What is the size of the square (in square centimeters)? "))</div><div>side = math.sqrt(area)</div><div>print("Each side of the square is ", side, "centimeters." )<br><br>(b)<br>import random</div><div><br></div><div>num1 = int(input("Enter a positive integer: "))</div><div>print(random.randint(1,num1))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:18:18 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000345950</guid>
      </item>
      <item>
         <title></title>
         <author>weizhelim2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000346883</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F] ")</div><div><br></div><div>print("Your premium is ",week2_utility.get_insurance_premium(age,gender))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:18:35 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000346883</guid>
      </item>
      <item>
         <title></title>
         <author>wongyh2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000348935</link>
         <description><![CDATA[<div>size = float(input("What's the size of the square (in square centimeters)? "))</div><div>size = size**(1/2)</div><div>print("Each side of this square is", size, "centimeters.")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:19:31 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000348935</guid>
      </item>
      <item>
         <title></title>
         <author>wongyh2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000349433</link>
         <description><![CDATA[<div>import random</div><div>n = int(input("Enter a positive integer: "))</div><div>print(random.randint(1,n))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:19:45 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000349433</guid>
      </item>
      <item>
         <title></title>
         <author>wongyh2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000349977</link>
         <description><![CDATA[<div><br>from week2_utility import get_insurance_premium<br>age = int(input("What's your age? "))<br>gender = input("What's your gender? [M|F]? ")<br>print("Your premium is $"+ str(get_insurance_premium(age,gender)))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:19:58 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000349977</guid>
      </item>
      <item>
         <title></title>
         <author>wongyh2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000351640</link>
         <description><![CDATA[<div>input_str = input('Please enter the system time (in seconds): ')</div><div><br></div><div>################################################################################</div><div># Complete the code below to get the correct numbers of days, hours, minutes and seconds.</div><div>input_int = int(input_str)</div><div>num_days = input_int//(3600*24)</div><div>remaing_hours = input_int%(3600*24)</div><div>num_hours = remaing_hours//3600</div><div>remaining_minutes = remaing_hours % 3600</div><div>num_minutes = remaining_minutes//60</div><div>num_seconds = remaining_minutes % 60</div><div><br></div><div># Put your code below</div><div><br><br><br><br></div><div>################################################################################</div><div># DO NOT MODIFY THE CODE BELOW!!!</div><div><br></div><div># This line of code displays the results.</div><div>print('Based on this system time, ' + str(num_days) + ' days, ' + str(num_hours) + ' hours, ' + str(num_minutes) + ' minutes and ' + str(num_seconds) + ' seconds have passed since 1 January 1970 00:00:00 UT.')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:20:40 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000351640</guid>
      </item>
      <item>
         <title></title>
         <author>weizhelim2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000369909</link>
         <description><![CDATA[<div>num_days = input_str//86400</div><div>remainderdays = input_str%86400</div><div>num_hours = remainderdays//3600</div><div>remainderhours = remainderdays%3600</div><div>num_minutes = remainderhours//60</div><div>remainderminutes = remainderhours%60&nbsp;</div><div>num_seconds = remainderminutes//60</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:28:09 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000369909</guid>
      </item>
      <item>
         <title></title>
         <author>weizhelim2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000425069</link>
         <description><![CDATA[<div>(a)<br>def calculate_tax_1(income):</div><div>&nbsp; &nbsp; taxrate = float((income-20000)*0.02)</div><div>&nbsp; &nbsp; return taxrate</div><div><br>(b)<br>def calculate_tax_2(income):</div><div>&nbsp; &nbsp; taxrate = max((income-20000)*0.02,0)</div><div>&nbsp; &nbsp; return taxrate</div><div><br>(c)<br>def calculate_tax_3(income):</div><div>&nbsp; &nbsp; taxrate = max((income-20000)*0.02, (income-30000)*0.035 + 200, 0)</div><div>&nbsp; &nbsp; return taxrate</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:49:27 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000425069</guid>
      </item>
      <item>
         <title></title>
         <author>wongyh2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000429730</link>
         <description><![CDATA[<div>8a)&nbsp;<br>return&nbsp; (income-20000)*0.02<br>8b)<br>&nbsp; &nbsp; tax_income = max(income-20000, 0)</div><div>&nbsp; &nbsp; tax = tax_income * 0.02</div><div>&nbsp; &nbsp; return tax<br>8c)<br>    income_1 = income - 30000</div><div>&nbsp; &nbsp; tax_1 = max(income_1,0)*0.035</div><div>&nbsp; &nbsp; tax_2 = min(max(income-20000,0,),10000)*0.02</div><div>&nbsp; &nbsp; income = tax_1 + tax_2</div><div>&nbsp; &nbsp; return income</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 13:51:15 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000429730</guid>
      </item>
      <item>
         <title></title>
         <author>eetingoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000454510</link>
         <description><![CDATA[<div>size = float(input("What's the size of the square (in square centimeters)? "))</div><div>import math</div><div>side = math.sqrt(size)</div><div>print("Each side of this square is " + str(side) + " centimeters")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:00:16 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000454510</guid>
      </item>
      <item>
         <title></title>
         <author>eetingoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000455073</link>
         <description><![CDATA[<div>n = int(input("Enter a positive integer: "))</div><div>import random</div><div>print(random.randint(1,n))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:00:30 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000455073</guid>
      </item>
      <item>
         <title></title>
         <author>eetingoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000455795</link>
         <description><![CDATA[<div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>import week2_utility</div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div>print("Your premium is $",premium)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:00:48 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000455795</guid>
      </item>
      <item>
         <title>Seah Yu Xuan</title>
         <author></author>
         <link>https://padlet.com/michellekan/week2b/wish/2000455951</link>
         <description><![CDATA[<div>(a)<br>return (income-20000)*0.02<br><br>(b)<br>&nbsp; taxincome = income - 20000<br>&nbsp; &nbsp;taxpay = max(0,taxincome)<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; return taxpay*0.02<br><br>(c)<br><br>taxincome1 = income - 30000<br>&nbsp; &nbsp; taxpay1 = max(0,taxincome1*0.035+200)<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; taxincome2 = income - 20000<br>&nbsp; &nbsp; taxpay2 = max(0,taxincome2*0.02)<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; return max(0,taxpay1,taxpay2)<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:00:51 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000455951</guid>
      </item>
      <item>
         <title></title>
         <author>eetingoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000456878</link>
         <description><![CDATA[<div>num_days = input_str // (60*60*24)</div><div>num_hours = (input_str - num_days*60*60*24) // (60*60)</div><div>num_minutes = (input_str - num_days*60*60*24 - num_hours*60*60) // 60</div><div>num_seconds = (input_str - num_days*60*60*24 - num_hours*60*60 - num_minutes*60)&nbsp;</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:01:12 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000456878</guid>
      </item>
      <item>
         <title>Seah Yu Xuan</title>
         <author></author>
         <link>https://padlet.com/michellekan/week2b/wish/2000475071</link>
         <description><![CDATA[<div>daysec = 60*60*24<br>hoursec = 60*60<br>minsec = 60<br><br>time = int(input_str)<br>num_days = time//daysec<br>left1 = time%daysec<br>num_hours = left1 //hoursec<br>left2 = time%daysec%hoursec<br>num_minutes = left2//minsec<br>num_seconds = time%daysec%hoursec%minsec</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:08:10 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000475071</guid>
      </item>
      <item>
         <title>Vienna Chong</title>
         <author>viennachong2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000515710</link>
         <description><![CDATA[<div>a)<br>import math</div><div>def area_into_side (area):</div><div>&nbsp; &nbsp; side = math.sqrt(area)</div><div>&nbsp; &nbsp; return side</div><div><br></div><div>area = float(input("What's the size of the square (in square centimeters)? "))</div><div>side = area_into_side(area)</div><div>print(f'Each side of this square is {side} centimeters.')<br><br>b)<br>import random</div><div><br></div><div>def randomrange(num):</div><div>&nbsp; &nbsp; num = random.randint(1,num)</div><div>&nbsp; &nbsp; return num</div><div><br></div><div>num = int(input('Enter a positive integer: '))</div><div>randnum = randomrange(num)</div><div>print(randnum)</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:22:56 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000515710</guid>
      </item>
      <item>
         <title>Vienna Chong</title>
         <author>viennachong2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000516554</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("Enter your age: "))</div><div>gender = str(input("Enter your gender [M|F]: "))</div><div><br></div><div>insur_prem = week2_utility.get_insurance_premium(age,gender)</div><div>print(f'Your premium is ${insur_prem}')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:23:14 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000516554</guid>
      </item>
      <item>
         <title>Edmund</title>
         <author>edmundwoon2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000554784</link>
         <description><![CDATA[<div>a)<br>import math</div><div><br><br><br><br></div><div>def side_of_square (area):</div><div>&nbsp; &nbsp; side = math.sqrt(area)</div><div>&nbsp; &nbsp; print(f'Each side of this square is {side} centimeters.')</div><div><br></div><div>x = float(input("What's the size of the square (in square centimeters)?"))</div><div><br></div><div>side_of_square (x)<br><br>b)<br><br>import random</div><div><br></div><div>def random_value (x):</div><div><br></div><div>&nbsp; &nbsp; print(random.randint (1,x))</div><div><br></div><div>random_value (int(input("Enter a positive integer:")))</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:36:15 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000554784</guid>
      </item>
      <item>
         <title>Edmund</title>
         <author>edmundwoon2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000555397</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input ("What is your age?:"))</div><div>gender = input ("What is your gender? (M/F):")</div><div><br></div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div>print(f'Your health insurance premium is ${premium}.')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:36:28 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000555397</guid>
      </item>
      <item>
         <title>Oh Rui Han </title>
         <author>ruihanoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000588979</link>
         <description><![CDATA[<div>a) import math</div><div><br><br></div><div>area = int(input("What's the size of the square (in square centimeters)?"))</div><div>side = math.sqrt(area)</div><div>print(f"Each side of this square is {side} centimeters.")<br><br>b) import random</div><div><br></div><div>p_int = int(input("Enter a positive integer: "))</div><div><br></div><div>answer = random.randint(1, p_int)</div><div>print(answer)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:47:49 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000588979</guid>
      </item>
      <item>
         <title>Oh Rui Han </title>
         <author>ruihanoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000589803</link>
         <description><![CDATA[<div>sample_age = float(input("What's your age? "))</div><div>sample_gender = input("What's your gender [M|F]? ")</div><div><br></div><div>import week2_utility</div><div><br></div><div>premium = week2_utility.get_insurance_premium(sample_age, sample_gender)</div><div><br></div><div>print(f"Your premium is ${premium}")</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:48:07 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000589803</guid>
      </item>
      <item>
         <title>Oh Rui han </title>
         <author>ruihanoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000595684</link>
         <description><![CDATA[<div>input_str = float(input('Please enter the system time (in seconds): '))</div><div><br></div><div>################################################################################</div><div># Complete the code below to get the correct numbers of days, hours, minutes and seconds.</div><div><br></div><div>num_days = 0</div><div>num_hours = 0</div><div>num_minutes = 0</div><div>num_seconds = 0</div><div><br></div><div># Put your code below</div><div><br><br><br><br></div><div>num_days = (input_str) // 86400</div><div>num_hours = (input_str % 86400) // 3600</div><div>num_minutes = (num_days % 3600) // 60</div><div>num_seconds = num_hours % 60 //60</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:50:06 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000595684</guid>
      </item>
      <item>
         <title>Vienna Chong</title>
         <author>viennachong2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000603999</link>
         <description><![CDATA[<div>#I change the type from string to int</div><div>input_str = int(input('Please enter the system time (in seconds): '))</div><div><br></div><div>num_days = 0</div><div>num_hours = 0</div><div>num_minutes = 0</div><div>num_seconds = 0</div><div><br></div><div># Put your code below</div><div><br></div><div>def sys_time_days(input):</div><div>&nbsp; &nbsp; num_days = input//(60*60*24)</div><div>&nbsp; &nbsp; return num_days</div><div><br></div><div>def sys_time_hours(input):</div><div>&nbsp; &nbsp; num_hours = input//(60*60)</div><div>&nbsp; &nbsp; return num_hours</div><div><br></div><div>def sys_time_min(input):</div><div>&nbsp; &nbsp; num_min = input//(60)</div><div>&nbsp; &nbsp; return num_min</div><div><br></div><div>def sys_time_sec(input):</div><div>&nbsp; &nbsp; num_sec = input</div><div>&nbsp; &nbsp; return num_sec</div><div><br></div><div>num_days = sys_time_days(input_str)</div><div>input_str = input_str-(num_days*60*60*24)</div><div>num_hours = sys_time_hours(input_str)</div><div>input_str = input_str-(num_hours*60*60)</div><div>num_minutes = sys_time_min(input_str)</div><div>input_str = input_str-(num_minutes*60)</div><div>num_seconds = sys_time_sec(input_str)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:53:00 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000603999</guid>
      </item>
      <item>
         <title>Mindy Q5</title>
         <author>mindytan2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000615179</link>
         <description><![CDATA[<div>a) import math</div><div>area = int(input("What's the size of the square (in square centimeters)?"))</div><div>side = math.sqrt(area)</div><div>print(f"Each side of this square is {side} centimeters.")<br><br>b) import random</div><div>p_int = int(input("Enter a positive integer: "))</div><div><br></div><div>answer = random.randint(1, p_int)</div><div>print(answer)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:56:49 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000615179</guid>
      </item>
      <item>
         <title>Mindy Q6</title>
         <author>mindytan2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000617927</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>premium = week2_utility.get_insurance_premium(age, gender)</div><div>print("Your premium is $" + str(premium))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:57:41 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000617927</guid>
      </item>
      <item>
         <title></title>
         <author>VanesseKoo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000620277</link>
         <description><![CDATA[<div>a)import math</div><div><br></div><div>area=int(input("What is the size of the square (in square centimeters)? "))</div><div>side = math.sqrt(area)</div><div>print("Each side of the square is ", side, "centimeters." )<br><br>(b)import random</div><div><br></div><div>num1 = int(input("Enter a positive integer: "))</div><div>print(random.randint(1,num1))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:58:30 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000620277</guid>
      </item>
      <item>
         <title></title>
         <author>eetingoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000622380</link>
         <description><![CDATA[<div>a) def calculate_tax_1(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $20,000 and $30,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; return (income-20000)*0.02<br><br>b) def calculate_tax_2(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $0 and $30,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp; return max(income - 20000, 0)*0.02<br><br>c) def calculate_tax_3(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $0 and $40,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp; return max(max(income-30000, 0)*0.035+(income//30000)*200, max(income-20000,0)*0.02)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:59:13 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000622380</guid>
      </item>
      <item>
         <title></title>
         <author>VanesseKoo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000622483</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M/F]? ")</div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div>print("Your premium is $",premium)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:59:15 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000622483</guid>
      </item>
      <item>
         <title></title>
         <author>VanesseKoo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000622998</link>
         <description><![CDATA[<div>input = int(input_str)</div><div>num_days = input//(60*60*24)</div><div>num_hours = input%(60*60*24) //(60*60)</div><div>num_minutes = input%(60*60) //60</div><div>num_seconds = input%60</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 14:59:25 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000622998</guid>
      </item>
      <item>
         <title>Mindy Q7</title>
         <author>mindytan2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000629448</link>
         <description><![CDATA[<div>num_days = input_str // (60*60*24)</div><div><br>num_hours = (input_str - num_days*60*60*24) // (60*60)</div><div><br>num_minutes = (input_str - num_days*60*60*24 - num_hours*60*60) // 60</div><div><br>num_seconds = (input_str - num_days*60*60*24 - num_hours*60*60 - num_minutes*60)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 15:01:38 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000629448</guid>
      </item>
      <item>
         <title>Oh Rui Han </title>
         <author>ruihanoh2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000658385</link>
         <description><![CDATA[<div>a)&nbsp;<br>def calculate_tax_1(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $20,000 and $30,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp; taxable_income = income - 20000</div><div>&nbsp; &nbsp; tax = (taxable_income) * 0.02</div><div>&nbsp; &nbsp; return tax</div><div>&nbsp; &nbsp;&nbsp;<br>b)&nbsp;<br>def calculate_tax_2(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $0 and $30,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div><br></div><div>&nbsp; &nbsp; taxable_income = max(income - 20000, 0)</div><div>&nbsp; &nbsp; tax = taxable_income * 0.02</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; return tax<br><br>c)&nbsp;<br><br>def calculate_tax_3(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $0 and $40,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; tax = max(income-30000, 0) * (0.035 - 0.02) + max(income - 20000, 0) * (0.02)</div><div><br></div><div>&nbsp; &nbsp; return tax</div><div><br></div><div><br><br></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 15:11:46 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000658385</guid>
      </item>
      <item>
         <title>Vienna Chong</title>
         <author>viennachong2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000676270</link>
         <description><![CDATA[<div>8a)<br>if income &gt; 20000:</div><div>&nbsp; &nbsp; &nbsp;tax = (income-20000)*0.02</div><div>&nbsp; &nbsp; else: tax = 0</div><div><br></div><div>&nbsp; &nbsp; return tax</div><div>&nbsp; &nbsp;&nbsp;<br>8b)<br>if income &gt; 20000:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = (income-20000)*0.02</div><div>&nbsp; &nbsp; elif income &gt;= 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = 0</div><div>&nbsp; &nbsp; else:&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; return tax<br><br>8c)<br>&nbsp; if income &gt; 30000:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = ((income-30000)*0.035)+200</div><div>&nbsp; &nbsp; elif income &gt; 20000:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = (income-20000)*0.02</div><div>&nbsp; &nbsp; elif income &gt;= 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = 0</div><div>&nbsp; &nbsp; else:&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; return tax</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 15:18:02 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000676270</guid>
      </item>
      <item>
         <title>Guang Guo</title>
         <author>GuangGuo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2000698972</link>
         <description><![CDATA[<div>num_days = int(input_str) // 86400&nbsp;</div><div>remainder = int(input_str) % 86400</div><div><br></div><div>num_hours = remainder // 3600</div><div>remainder = remainder % 3600</div><div><br><br></div><div>num_minutes = remainder // 60</div><div>remainder = remainder % 60</div><div><br><br></div><div>num_seconds = remainder&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-19 15:26:00 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2000698972</guid>
      </item>
      <item>
         <title>Cai Jun</title>
         <author>caijunng2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2001910655</link>
         <description><![CDATA[<div>a) import math</div><div>x= int(input("What's the size of the square (in square centimeters)? "))</div><div>x=math.sqrt(x)</div><div><br></div><div>print(f"Each side of this square is {x} centimeters")<br><br>b) import random</div><div>x = int(input("Enter a positive integer: "))</div><div>print(random.randint(1,x))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 03:24:57 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2001910655</guid>
      </item>
      <item>
         <title>Cai Jun</title>
         <author>caijunng2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2001911224</link>
         <description><![CDATA[<div>age=int(input("What's your age? "))</div><div>gender=input("What's your gender [M|F]? ")</div><div>import week2_utility</div><div>amount=week2_utility.get_insurance_premium(age,gender)</div><div>print(f"Your premium is ${amount}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 03:25:24 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2001911224</guid>
      </item>
      <item>
         <title></title>
         <author>tianxinyu2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002002595</link>
         <description><![CDATA[<div>5a:<br><br>import math</div><div><br></div><div>area = int(input("What's the size of the square (in square centimeters)? "))</div><div>side = float(math.sqrt(area))</div><div>print(<strong>f</strong>'Each side of this square is {side} centimeters.')<br><br>5b:<br><br>import random</div><div><br></div><div>n = int(input("Enter a positive integer: "))</div><div>rand_num = random.randint(1, n)</div><div>print(rand_num)</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 04:36:16 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002002595</guid>
      </item>
      <item>
         <title></title>
         <author>tianxinyu2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002006769</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = input("What's your gender [M|F]? ")</div><div>premium = week2_utility.get_insurance_premium(age, gender)</div><div>print(<strong>f</strong>'Your premium is ${premium}')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 04:36:39 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002006769</guid>
      </item>
      <item>
         <title></title>
         <author>tianxinyu2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002007787</link>
         <description><![CDATA[<div>input_int = int(input_str)<br><br>num_days = input_int // (60 * 60 * 24)</div><div>num_hours = (input_int % (60 * 60 * 24)) // (60 * 60)</div><div>num_minutes = (input_int - ((num_days * (60 * 60 * 24)) + (num_hours * (60 * 60)))) // 60</div><div>num_seconds = input_int % 60</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 04:37:25 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002007787</guid>
      </item>
      <item>
         <title></title>
         <author>tianxinyu2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002009224</link>
         <description><![CDATA[<div>8a:&nbsp;<br><br>tax = 2 / 100 * (income - 20000) &nbsp;<br>return 0.0 + tax</div><div>&nbsp; &nbsp;&nbsp;<br>8b:<br><br>&nbsp; &nbsp; tax = max(2 / 100 * (income - 20000), 0)&nbsp;</div><div>&nbsp; &nbsp; return 0.0 + tax<br><br>8c:<br><br>&nbsp; &nbsp; if income &gt; 30000:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = (3.5 / 100 * (income - 30000)) + 200</div><div>&nbsp; &nbsp; elif income &gt; 20000:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = (2 / 100 * (income - 20000))</div><div>&nbsp; &nbsp; elif income &gt;= 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = 0</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tax = 0<br><br></div><div>&nbsp; &nbsp; return tax</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 04:38:30 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002009224</guid>
      </item>
      <item>
         <title></title>
         <author>VanesseKoo</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002185156</link>
         <description><![CDATA[<div>8a:<br>def calculate_tax_1(income):</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; tax_payable = (income - 20000) * 0.02</div><div>&nbsp; &nbsp; return tax_payable<br><br>8b:<br>def calculate_tax_2(income):</div><div>&nbsp;</div><div>&nbsp; &nbsp; tax_payable3 = max((income - 20000),0)</div><div>&nbsp; &nbsp; tax_payable2 = tax_payable3 * 0.02</div><div>&nbsp; &nbsp; total_tax = tax_payable2&nbsp;</div><div>&nbsp; &nbsp; return total_tax<br><br>8c:<br>def calculate_tax_3(income):</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; tax_payable = max(((income-20000)*0.02), ((income-30000)*0.035+200), ((income-40000)*0.07), 0)</div><div>&nbsp; &nbsp; return tax_payable&nbsp;</div><div><br></div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 07:04:56 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002185156</guid>
      </item>
      <item>
         <title>Sylvia Loo</title>
         <author>sylvialoo2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002386317</link>
         <description><![CDATA[<div>5a)<br>import math<br>area=int(input("What is the size of the square (in square centimeters)? "))<br>side = math.sqrt(area)<br>print("Each side of the square is ", side, "centimeters." )<br><br>5b)<br>import random<br>def randomrange(num):<br>&nbsp; &nbsp; num = random.randint(1,num)<br>&nbsp; &nbsp; return num<br><br>num = int(input('Enter a positive integer: '))<br>randnum = randomrange(num)<br>print(randnum)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 09:06:27 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002386317</guid>
      </item>
      <item>
         <title>Sylvia</title>
         <author>sylvialoo2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002388586</link>
         <description><![CDATA[<div>import week2_utility<br><br>a = int(input("What's your age? "))<br>b = input("What's your gender [M][F]? ")<br><br>premium = week2_utility.get_insurance_premium(age, gender)<br>print("Your premium is $" + "premium")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 09:07:56 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002388586</guid>
      </item>
      <item>
         <title>Sylvia Loo</title>
         <author>sylvialoo2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002390965</link>
         <description><![CDATA[<div>num = int(input_str)<br><br>num_seconds = num % 60<br>num = num // 60<br><br>num_minutes = num % 60<br><br>num_hours = num % 24<br><br>num_days = num // 24</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 09:09:29 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002390965</guid>
      </item>
      <item>
         <title></title>
         <author>joelkang2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002528147</link>
         <description><![CDATA[<div>5a)&nbsp;<br>import math</div><div><br></div><div>area_of_sq = int(input("What's the size of the square (in square centimers)? "))</div><div>length = math.sqrt(area_of_sq)</div><div>print (f"Each side of this square is {length} centimers.")<br><br>5b)<br>import random</div><div><br></div><div>upper_bound = int(input("Enter a positive integer: "))</div><div>chosen_num = random.randint(1, upper_bound)</div><div>print (chosen_num)<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 10:28:49 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002528147</guid>
      </item>
      <item>
         <title></title>
         <author>joelkang2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002528581</link>
         <description><![CDATA[<div>import week2_utility</div><div>age = int(input("Please enter your age: "))</div><div>gender = input("Please enter your gender [M|F]:")</div><div>premium = week2_utility.get_insurance_premium (age, gender)</div><div>print (f'Your premium is ${premium}')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 10:29:04 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002528581</guid>
      </item>
      <item>
         <title></title>
         <author>joelkang2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002529586</link>
         <description><![CDATA[<div>num_days = input_str // 86400</div><div>remain_1 = input_str - num_days * 86400</div><div><br></div><div>num_hours = remain_1 // 3600</div><div>remain_2 = remain_1 - num_hours * 3600</div><div><br></div><div>num_minutes = remain_2 // 60</div><div>remain_3 = remain_2 - num_minutes * 60</div><div><br></div><div>num_seconds = remain_3 // 1</div><div>remain_4 = remain_3 - num_seconds * 1</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 10:29:43 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002529586</guid>
      </item>
      <item>
         <title></title>
         <author>joelkang2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2002531076</link>
         <description><![CDATA[<div>8a)<br>&nbsp; &nbsp; tax_free = income - 20000</div><div>&nbsp; &nbsp; next_ten_thousand = tax_free * 0.02</div><div>&nbsp; &nbsp; return next_ten_thousand<br><br>8b)<br>&nbsp; &nbsp; tax_paid = max(0, (income-20000) * 0.02)</div><div>&nbsp; &nbsp; return tax_paid<br><br>8c)<br>&nbsp; &nbsp;tax_paid = max(0, (income - 20000)*0.02, 200 + (income - 30000)*0.035)</div><div>&nbsp; &nbsp; return tax_paid</div><div><br><br></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 10:30:45 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2002531076</guid>
      </item>
      <item>
         <title>Gavin Tay</title>
         <author>Gavin_Tay_Kai_Kang</author>
         <link>https://padlet.com/michellekan/week2b/wish/2003042523</link>
         <description><![CDATA[<div>(a)&nbsp;<br><br>import math<br><br>area= int(input("What's the size of the square (in square centimeters)?"))<br>square_side = area * (1/2)<br>print("Each side of the square is", square_side, "centimeters")<br><br>(b)<br><br>import random<br><br>positive_integer = int(input("Enter a positive integer:"))<br>print(random.randint(1,positive_integer))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 14:53:59 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2003042523</guid>
      </item>
      <item>
         <title>Gavin Tay</title>
         <author>Gavin_Tay_Kai_Kang</author>
         <link>https://padlet.com/michellekan/week2b/wish/2003058152</link>
         <description><![CDATA[<div>import week2_utility<br><br>age = int(input("What's your age?"))<br>gender = input(What's your gender [M|F]?")<br>get_insurance_premium(age, gender)<br>print("Your premium is $", get_insurance_premium)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 14:59:40 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2003058152</guid>
      </item>
      <item>
         <title>Gavin Tay</title>
         <author>Gavin_Tay_Kai_Kang</author>
         <link>https://padlet.com/michellekan/week2b/wish/2003082820</link>
         <description><![CDATA[<div>input_str = input<br><br>num_days = input//(60*60*24)<br><br></div><div>num_hours = (input_str - num_days*60*60*24) // (60*60)<br><br></div><div>num_minutes = (input_str - num_days*60*60*24 - num_hours*60*60) // 60<br><br></div><div>num_seconds = (input_str - num_days*60*60*24 - num_hours*60*60 - num_minutes*60)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 15:08:08 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2003082820</guid>
      </item>
      <item>
         <title>Matthew</title>
         <author>matthewtee2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2003390024</link>
         <description><![CDATA[<div>num_days = 0 + int(input_str) // (60*60*24)</div><div>ex_days = int(input_str) % (60*60*24)</div><div><br></div><div>num_hours = 0 + ex_days // (60*60)</div><div>ex_hours = ex_days % (60*60)</div><div><br></div><div>num_minutes = 0 + ex_hours // 60</div><div>ex_minutes = ex_hours % 60</div><div><br></div><div>num_seconds = 0 + ex_minutes</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 17:11:54 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2003390024</guid>
      </item>
      <item>
         <title>Matthew</title>
         <author>matthewtee2020</author>
         <link>https://padlet.com/michellekan/week2b/wish/2003392999</link>
         <description><![CDATA[<div>a)<br>pro_tax_1 = ((income - 20000) / 100) * 2</div><div>total_tax_1 = 0 + pro_tax_1</div><div><br></div><div>return total_tax_1<br><br>b)<br>total_tax = max((income - 20000) * 0.02, 0)</div><div><br></div><div>return total_tax<br><br>c)<br>tax_1 = ((income - 20000) / 100) * 2</div><div>tax_2 = (income - 20000) * 0.02</div><div>tax_3 = (income - 30000) * 0.035 + 200</div><div><br></div><div>total_tax = max(tax_1, tax_2, tax_3, 0)</div><div><br></div><div>return total_tax</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-20 17:13:19 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2003392999</guid>
      </item>
      <item>
         <title></title>
         <author>darrentann</author>
         <link>https://padlet.com/michellekan/week2b/wish/2004498430</link>
         <description><![CDATA[<div>8a) tax = (income - 20000) * 0.02</div><div>&nbsp; &nbsp; return tax</div><div><br><br>b) taxincome = max(income - 20000, 0)</div><div>&nbsp; &nbsp; tax = taxincome * 0.02</div><div>&nbsp; &nbsp; return tax<br><br>c) tax1 =&nbsp; (income - 20000) * 0.02</div><div>&nbsp; &nbsp; tax2 =&nbsp; (income - 30000) * 0.035 + 200</div><div>&nbsp; &nbsp; tax = max(tax1, tax2,0)</div><div>&nbsp; &nbsp; return tax</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-21 07:15:17 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2004498430</guid>
      </item>
      <item>
         <title>hshi qi</title>
         <author>hqang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2004765571</link>
         <description><![CDATA[<div>5a)<br>import math<br><br>sqsize = int(input("What's the size of the square (in square centimeters) ? "))<br><br>print('Each side of this square is', float(math.sqrt(sqsize)), 'centimeters')<br><br>5b)<br>import random<br><br>integer = int(input('Enter a positive integer: '))<br><br>print(random.randint(1,integer)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-21 10:32:13 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2004765571</guid>
      </item>
      <item>
         <title>hshi qi</title>
         <author>hqang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2004768004</link>
         <description><![CDATA[<div>import week2_utility</div><div><br></div><div>age = int(input ("What is your age?:"))</div><div>gender = input ("What is your gender? (M/F):")</div><div><br></div><div>premium = week2_utility.get_insurance_premium(age,gender)</div><div>print(f'Your health insurance premium is ${premium}.')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-21 10:34:11 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2004768004</guid>
      </item>
      <item>
         <title>hshi qi</title>
         <author>hqang2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2004772376</link>
         <description><![CDATA[<div>num_days = input_str // (60*60*24)</div><div>num_hours = (input_str - num_days*60*60*24) // (60*60)</div><div>num_minutes = (input_str - num_days*60*60*24 - num_hours*60*60) // 60</div><div>num_seconds = (input_str - num_days*60*60*24 - num_hours*60*60 - num_minutes*60)&nbsp;</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-21 10:37:30 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2004772376</guid>
      </item>
      <item>
         <title>Mindy Q8</title>
         <author></author>
         <link>https://padlet.com/michellekan/week2b/wish/2006044849</link>
         <description><![CDATA[<div>Q8a:<br>def calculate_tax_1(income):</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; tax_payable = (income - 20000) * 0.02</div><div>&nbsp; &nbsp; return tax_payable<br><br>Q8b:<br>def calculate_tax_2(income):</div><div>&nbsp;</div><div>&nbsp; &nbsp; tax_payable3 = max((income - 20000),0)</div><div>&nbsp; &nbsp; tax_payable2 = tax_payable3 * 0.02</div><div>&nbsp; &nbsp; total_tax = tax_payable2&nbsp;</div><div>&nbsp; &nbsp; return total_tax<br><br>Q8c:<br>def calculate_tax_3(income):</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; tax_payable = max(((income-20000)*0.02), ((income-30000)*0.035+200), ((income-40000)*0.07), 0)</div><div>&nbsp; &nbsp; return tax_payable&nbsp;</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-22 03:31:29 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2006044849</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/michellekan/week2b/wish/2006394789</link>
         <description><![CDATA[<div>Q 5a) size_square = int(input("What's the size of the square (in square centimeters)? "))</div><div><br></div><div>import math&nbsp;</div><div><br></div><div>square_root = float(math.sqrt(size_square))</div><div>print(f'Each side of this square is {square_root} centimeters.')<br><br>Q 5b) input_integer = int((input('Enter a positive integer: ')))</div><div><br></div><div>import random</div><div>a = 1</div><div>b = 10&nbsp;</div><div>print(random.randint(a, b))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-22 14:14:31 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2006394789</guid>
      </item>
      <item>
         <title></title>
         <author>CelineYap</author>
         <link>https://padlet.com/michellekan/week2b/wish/2006395637</link>
         <description><![CDATA[<div>Q 5a) size_square = int(input("What's the size of the square (in square centimeters)? "))</div><div><br></div><div>import math&nbsp;</div><div><br></div><div>square_root = float(math.sqrt(size_square))</div><div>print(f'Each side of this square is {square_root} centimeters.')<br><br>Q 5b) input_integer = int((input('Enter a positive integer: ')))</div><div><br></div><div>import random</div><div>a = 1</div><div>b = 10&nbsp;</div><div>print(random.randint(a, b))</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-22 14:15:35 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2006395637</guid>
      </item>
      <item>
         <title></title>
         <author>CelineYap</author>
         <link>https://padlet.com/michellekan/week2b/wish/2006395920</link>
         <description><![CDATA[<div>Q 6) import week2_utility</div><div><br></div><div>age = int(input("What's your age? "))</div><div>gender = str(input("What's your gender [M/F]? "))</div><div><br></div><div>premium = week2_utility.get_insurance_premium(age, gender)</div><div>print(f"Your premium is ${premium}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-22 14:16:01 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2006395920</guid>
      </item>
      <item>
         <title></title>
         <author>CelineYap</author>
         <link>https://padlet.com/michellekan/week2b/wish/2006396112</link>
         <description><![CDATA[<div>Q 7)&nbsp;</div><div>input_str = int(input('Please enter the system time (in seconds): '))</div><div><br></div><div>num_days = input_str // (60 * 60 * 24)</div><div>remainder_1 = input_str % (60 * 60 * 24)</div><div><br></div><div>num_hours = remainder_1 // (60 * 60)</div><div>remainder_2 = remainder_1 % (60 * 60)</div><div><br></div><div>num_minutes = remainder_2 // (60)</div><div>remainder_3 = remainder_2 % (60)</div><div>num_seconds = remainder_3<br><br></div><div>print('Based on this system time, ' + str(num_days) + ' day(s), ' + str(num_hours) + ' hour(s), ' + str(num_minutes) + ' minute(s) and ' + str(num_seconds) + ' second(s) have passed since 1 January 1970 00:00:00 UT.')</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-22 14:16:21 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2006396112</guid>
      </item>
      <item>
         <title></title>
         <author>CelineYap</author>
         <link>https://padlet.com/michellekan/week2b/wish/2006397677</link>
         <description><![CDATA[<div>Q 8 a)&nbsp;</div><div>def calculate_tax_1(income):</div><div>&nbsp; &nbsp; total_tax = income - 20000</div><div>&nbsp; &nbsp; gross_tax_after_20k = total_tax * (2/100)</div><div>&nbsp; &nbsp; return gross_tax_after_20k<br><br></div><div>print(calculate_tax_1(25000.0))<br><br>Q8b)def calculate_tax_2(income):<br>&nbsp; &nbsp; total_tax = max(income - 20000, 0)&nbsp;<br>&nbsp; &nbsp; gross_tax_after_20k = total_tax * (2/100)</div><div>&nbsp; &nbsp; return gross_tax_after_20k<br><br>print(calculate_tax_2(25000.0))</div><div>print(calculate_tax_2(10000.0))</div><div><br>Q8c) def calculate_tax_3(income):<br>final_tax = max ( (income - 30000) * (0.035 - 0.02) , 0.0 ) + max ((income - 20000) * 0.02, 0.0)</div><div>&nbsp; &nbsp; return final_tax<br><br>print(calculate_tax_3(25000.0))</div><div>print(calculate_tax_3(10000.0))</div><div>print(calculate_tax_3(35000.0))</div><div><br></div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-22 14:18:36 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2006397677</guid>
      </item>
      <item>
         <title>Valerie Lai</title>
         <author>valerielai2019</author>
         <link>https://padlet.com/michellekan/week2b/wish/2007834079</link>
         <description><![CDATA[<div>8a)<br>return (income-20000)*0.02<br><br>8b)&nbsp;<br>return max ((income-20000) * 0.02, 0.0)<br><br>8c)&nbsp;<br>return max((income -20000)*0.02, 0.0) + max((income-30000)*(0.035-0.02), 0.0)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-24 02:45:08 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2007834079</guid>
      </item>
      <item>
         <title>Cai Jun</title>
         <author>caijunng2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2008163597</link>
         <description><![CDATA[<div>input_str = input('Please enter the system time (in seconds): ')</div><div>input_str=int(input_str)<br><br>num_days=input_str//86400</div><div>remainder=input_str-(num_days*86400)</div><div>num_hours=remainder//3600</div><div>remainder=remainder-(num_hours*3600)</div><div>num_minutes=remainder//60</div><div>remainder=remainder-(num_minutes*60)</div><div>num_seconds=remainder</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-24 07:19:12 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2008163597</guid>
      </item>
      <item>
         <title>Cai Jun</title>
         <author>caijunng2021</author>
         <link>https://padlet.com/michellekan/week2b/wish/2008287868</link>
         <description><![CDATA[<div>a) def calculate_tax_1(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $20,000 and $30,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp; x=income-20000</div><div>&nbsp; &nbsp; x=x*0.02</div><div>&nbsp; &nbsp; return x<br><br>b) def calculate_tax_2(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $0 and $30,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp; x=income-20000</div><div>&nbsp; &nbsp; tax=max(x,0)*0.02</div><div>&nbsp; &nbsp; return tax<br><br>c) def calculate_tax_3(income):</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp; This function assumes that the income is between $0 and $40,000.</div><div>&nbsp; &nbsp; """</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; # Modify the code below to return the right amount of tax.</div><div>&nbsp; &nbsp; x=income-20000</div><div>&nbsp; &nbsp; y=income-30000</div><div>&nbsp; &nbsp; tax=max(x,0)*0.02+max(y,0)*0.015</div><div>&nbsp; &nbsp; return tax</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-24 08:34:29 UTC</pubDate>
         <guid>https://padlet.com/michellekan/week2b/wish/2008287868</guid>
      </item>
   </channel>
</rss>
