<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>IS111 Week 12 ICE by Michelle Kan</title>
      <link>https://padlet.com/michellekan/is111week12</link>
      <description>Let&#39;s share our solutions!</description>
      <language>en-us</language>
      <pubDate>2021-05-12 15:07:59 UTC</pubDate>
      <lastBuildDate>2022-04-01 14:04:53 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f342.png</url>
      </image>
      <item>
         <title>Shannon Ong</title>
         <author>shannonong2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121195020</link>
         <description><![CDATA[<div>import string</div><div>finaldict = {}</div><div><br></div><div>userstr = input("Enter a string &gt; ")</div><div><br></div><div>while userstr != "":</div><div>&nbsp; &nbsp; if userstr[0] in string.ascii_letters:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; key = userstr[0].lower()</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; key = userstr[0]</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if key not in finaldict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; finaldict[key] = 1</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; finaldict[key] += 1</div><div>&nbsp; &nbsp; userstr = input("Enter a string &gt; ")</div><div><br></div><div>print("\nYou've enetered")</div><div>for key in finaldict:</div><div>&nbsp; &nbsp; if key in string.ascii_lowercase:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if finaldict[key] &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<em>f</em>"\t{finaldict[key]} strings starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<em>f</em>"\t{finaldict[key]} string starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if finaldict[key] &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<em>f</em>"\t{finaldict[key]} strings starting with'{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<em>f</em>"\t{finaldict[key]} string starting with'{key}'")</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:19:44 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121195020</guid>
      </item>
      <item>
         <title>Zheng Yi</title>
         <author>yizheng2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121195254</link>
         <description><![CDATA[<div>string = input("Enter a string &gt; ")</div><div>ref_list = {}</div><div><br></div><div>while string != '':</div><div>&nbsp; &nbsp; first = string[0].lower()</div><div>&nbsp; &nbsp; if first not in ref_list.keys():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ref_list[first] = [string]</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ref_list[first].append(string)</div><div>&nbsp; &nbsp; string = input("Enter a string &gt; ")</div><div><br></div><div>print("\nYou've entered")</div><div>for key,value in ref_list.items():</div><div>&nbsp; &nbsp; if key.isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(value) &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<strong>f</strong>"\t{len(value)} strings starting with '{key.upper()}' or '{key.lower()}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<strong>f</strong>"\t1 string starting with '{key.upper()}' or '{key.lower()}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(value) &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<strong>f</strong>"\t{len(value)} strings starting with '{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(<strong>f</strong>"\t1 string starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:19:56 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121195254</guid>
      </item>
      <item>
         <title>Shannon Ong</title>
         <author>shannonong2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121195638</link>
         <description><![CDATA[<div><em>def</em> count_emails(<em>file_name</em>, <em>start_time</em>, <em>end_time</em>, <em>sender</em>):</div><div>&nbsp; &nbsp; with open(<em>file_name</em>) as emailfile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; validsenders = []</div><div>&nbsp; &nbsp; &nbsp; &nbsp; validtime = []</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in emailfile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip("\n")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.split("\t")</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if line[1] == <em>sender</em>:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; validsenders.append(line)</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for email in validsenders:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timestamp =&nbsp; email[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start = <em>start_time</em>[0] + (<em>start_time</em>[1] / 60)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end = <em>end_time</em>[0] + (<em>end_time</em>[1] / 60)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if timestamp[-2:] == "PM" and timestamp[0:2] != "12":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(timestamp[0:2]) + 12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(timestamp[0:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute = int(timestamp[3:5]) / 60</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; second = int(timestamp[6:8]) / 100 / 60</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = hour + minute + second</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if time &gt;= start and time &lt;= end:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; validtime.append(email)</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count = len(validtime)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return count</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:20:14 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121195638</guid>
      </item>
      <item>
         <title>darren tan</title>
         <author>darrentann</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121195840</link>
         <description><![CDATA[<div>import string</div><div>dict = {}</div><div><br><br></div><div>word = input('Enter a string &gt; ')</div><div>&nbsp;</div><div>while not (word == ''):</div><div>&nbsp; &nbsp; if word[0].lower() not in dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dict[word[0].lower()] = 1</div><div><br></div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dict[word[0].lower()] += 1</div><div>&nbsp; &nbsp; word = input('Enter a string &gt; ')</div><div><br></div><div>print()</div><div>print("You've entered")</div><div>for key,value in dict.items():</div><div>&nbsp; &nbsp; if key in string.ascii_letters:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if value &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key.upper()}' or '{key.lower()}")</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} string starting with '{key.upper()}' or '{key.lower()}")</div><div><br></div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if value &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key}'")</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} string starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:20:24 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121195840</guid>
      </item>
      <item>
         <title>Zheng Yi</title>
         <author>yizheng2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121195966</link>
         <description><![CDATA[<div><strong>def</strong> count_emails(file_name, start_time, end_time, sender):</div><div><br></div><div>&nbsp; &nbsp; emails = {}</div><div><br></div><div>&nbsp; &nbsp; with open(file_name) as infile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in infile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time, sender_email, recipient = line.strip('\n').split('\t')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if len(time) &gt; 8:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hh, mm, ss = time[:-2].split(':')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if time[-2:] == 'PM' and time[:2] != '12':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hh = str(int(hh) + 12)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if time[-2:] == 'AM' and time[:2] == '12':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hh = '00'</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hh, mm, ss = time.split(':')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; standard_time = int(hh+mm+ss)</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sender_email not in emails:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emails[sender_email] = [(standard_time, recipient)]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emails[sender_email].append((standard_time, recipient))</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; count = 0</div><div><br></div><div>&nbsp; &nbsp; start = start_time[0]*10000 + start_time[1]*100</div><div>&nbsp; &nbsp; end = end_time[0]*10000 + end_time[1]*100</div><div><br></div><div>&nbsp; &nbsp; for send, records in emails.items():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for record in records:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sender == send and start &lt;= record[0] &lt;= end:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div><br></div><div>&nbsp; &nbsp; return count</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:20:30 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121195966</guid>
      </item>
      <item>
         <title>Danish</title>
         <author>mohamadma2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121196192</link>
         <description><![CDATA[<div>from string import ascii_uppercase</div><div>s=[]</div><div>mydict={}</div><div>mylist=[]</div><div><br></div><div>mystr=input("Enter a string &gt;")</div><div>s.append(mystr)</div><div>while mystr!="":</div><div>&nbsp; &nbsp; mystr=input("Enter a string &gt;")</div><div>&nbsp; &nbsp; if mystr!="":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; s.append(mystr)</div><div><br></div><div>if len(s)&gt;0:</div><div>&nbsp; &nbsp; for items in s:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if items[0] in ascii_uppercase:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str=items[0].lower()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mylist.append(str)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mydict[str]=mydict.get(str,0)+1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mydict[items[0]]=mydict.get(items[0],0)+1</div><div>&nbsp; &nbsp; print()</div><div>&nbsp; &nbsp; print("You've entered")</div><div>&nbsp; &nbsp; for k,v in mydict.items():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; str2="string"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; str3="'"+k+"'"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if k in mylist:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str3="'"+k.upper()+"'"+" or "+ "'"+k+"'"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if v&gt;1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str2="strings"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{v} {str2} starting with {str3}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:20:39 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121196192</guid>
      </item>
      <item>
         <title>Wei Zhe</title>
         <author>weizhelim2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121196202</link>
         <description><![CDATA[<div>from string import ascii_letters</div><div><br><br></div><div>newdict = {}</div><div>newstring = input("Enter a string &gt; ")</div><div>while newstring != "":</div><div>&nbsp; &nbsp; if newstring[0].lower() not in newdict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; newdict[newstring[0].lower()] = [newstring]</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; newdict[newstring[0].lower()].append(newstring)</div><div><br></div><div>&nbsp; &nbsp; newstring = input("Enter a string &gt; ")</div><div><br><br></div><div>print("")</div><div>print('You''ve entered')</div><div>for key in newdict:</div><div>&nbsp; &nbsp; if key in ascii_letters:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(newdict[key])&gt;1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("\t"+f" {len(newdict[key])} strings starting with '{key.upper()}' or '{key.lower()}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("\t"+f" {len(newdict[key])} string starting with '{key.upper()}' or '{key.lower()}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print("\t"+f" {len(newdict[key])} string starting with '{key}'")</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:20:40 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121196202</guid>
      </item>
      <item>
         <title>Wei Zhe</title>
         <author>weizhelim2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121196837</link>
         <description><![CDATA[<div>def count_emails(file_name,start_time,end_time,sender):</div><div>&nbsp; &nbsp; mydict = {}</div><div><br></div><div>&nbsp; &nbsp; with open(file_name,'r') as myfile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in myfile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip("\n")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; column = line.split("\t")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = column[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isender = column[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if "PM" in time:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_time = time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myhour = new_time[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if myhour != "12":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myhour = str(int(myhour) +12)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myminute = new_time[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mysecond = new_time[2].replace("PM",'')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif "AM" in time:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_time = time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myhour = new_time[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if myhour == "12":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myhour = "00"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myminute = new_time[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mysecond = new_time[2].replace("AM",'')&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_time = time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myhour = new_time[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myminute = new_time[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mysecond = new_time[2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if isender not in mydict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mydict[isender] = [(myhour,myminute,mysecond)]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mydict[isender].append((myhour,myminute,mysecond))</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; mycount =0</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; for key in mydict: &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if key == sender :</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for value in mydict[key]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(value[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute = int(value[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; second = int(value[2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if end_time[0] &gt; hour &gt; start_time[0]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mycount += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif hour == end_time[0]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if minute &gt;end_time[1]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mycount += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif minute == end_time[1] and second == 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mycount += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif hour == start_time[0]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&nbsp; minute &gt;= start_time[1]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mycount += 1</div><div><br><br></div><div>&nbsp; &nbsp; return(mycount)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:21:06 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121196837</guid>
      </item>
      <item>
         <title>Danish</title>
         <author>mohamadma2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121197905</link>
         <description><![CDATA[<div>def count_emails(fn,st,et,sender):</div><div>&nbsp; &nbsp; st=list(map(str,st))</div><div>&nbsp; &nbsp; et=list(map(str,et))</div><div>&nbsp; &nbsp; if(len(st[1])!=2):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; st[1]=st[1]+"000"</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; st[1]=st[1]+"00"</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if(len(et[1])!=2):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; et[1]=et[1]+"000"</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; et[1]=et[1]+"00"</div><div>&nbsp; &nbsp; starttime=int("".join(st))</div><div>&nbsp; &nbsp; endttime=int("".join(et))</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; mylist=[]</div><div>&nbsp; &nbsp; ctr=0</div><div>&nbsp; &nbsp; with open(fn) as f:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; newhh=0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; newss=0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in f:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; col=line.strip().split("\t")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #time,sender,recepient=col</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time2=col[0].split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hh,mm,seconds=time2</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if "PM" in seconds and int(hh)&lt;12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newhh=int(hh)+12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newhh=int(hh)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if len(time2[2])&gt;2:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newss=time2[2][:len(time2[2])-2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newss=time2[2]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time3=str(newhh)+mm+newss</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mylist.append([int(time3),col[1],col[2]])</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; for item in mylist:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if item[1]==sender and item[0]&gt;=starttime and item[0]&lt;=endttime:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctr+=1</div><div>&nbsp; &nbsp; return(ctr)&nbsp; &nbsp;</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:21:58 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121197905</guid>
      </item>
      <item>
         <title>Mah Kang Wei</title>
         <author>kangweimah2018</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121199759</link>
         <description><![CDATA[<div><br>enter_str = input("Enter a string &gt; ")<br>word_dict = {}<br>while enter_str != "":<br>&nbsp; &nbsp; str_lower = enter_str.lower()<br>&nbsp; &nbsp; str_first = str_lower[0]<br>&nbsp; &nbsp; if str_first not in word_dict:<br>&nbsp; &nbsp; &nbsp; &nbsp; word_dict[str_first] = 1<br>&nbsp; &nbsp; else:<br>&nbsp; &nbsp; &nbsp; &nbsp; word_dict[str_first] += 1<br>&nbsp; &nbsp; enter_str = input("Enter a string &gt; ")<br>print("You've entered")<br>for key, value in word_dict.items():<br>&nbsp; &nbsp; if key.isalpha():<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key.upper()}' or '{key.lower()}'")<br>&nbsp; &nbsp; else:<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:23:37 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121199759</guid>
      </item>
      <item>
         <title>Mah Kang Wei</title>
         <author>kangweimah2018</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121200463</link>
         <description><![CDATA[<div>def count_emails(filename, start_time, end_time, sender):</div><div>&nbsp; &nbsp; with open(filename, 'r') as input_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; hold = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in input_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; columns = line.rstrip("\n").split("\t")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_time = columns[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_sender = columns[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_rec = columns[2]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if len(email_time) &gt; 8:&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm = email_time[-2:]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if am_pm == "PM" and email_time[:2] != '12':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss = email_time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[0] = int(am_pm_ss[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[1] = int(am_pm_ss[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[2] = int(am_pm_ss[2][:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[0] += 12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss = email_time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[0] = int(am_pm_ss[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[1] = int(am_pm_ss[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[2] = int(am_pm_ss[2][:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss = email_time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[0] = int(am_pm_ss[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[1] = int(am_pm_ss[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; am_pm_ss[2] = int(am_pm_ss[2][:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_hh = int(am_pm_ss[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_mm = int(am_pm_ss[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_ss = int(am_pm_ss[2])</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (start_time[0] &lt; email_hh &lt; end_time[0]) and (email_sender == sender):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hold += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (start_time[0] == email_hh):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if email_hh &lt; end_time[0] and (email_sender == sender):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hold += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (email_hh == end_time[0]) and (email_mm &lt; end_time[1]) and (email_sender == sender):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hold += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (email_hh == end_time[0]) and (email_mm == end_time[1]) and (email_ss &lt;= 0) and (email_sender == sender):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hold += 1</div><div>&nbsp; &nbsp; return hold</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:24:11 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121200463</guid>
      </item>
      <item>
         <title>Jeffrey Chan</title>
         <author>jeffreychan2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121204701</link>
         <description><![CDATA[<div>list_word = []</div><div>while True:</div><div>&nbsp; &nbsp; word = input('Enter a string &gt; ')</div><div>&nbsp; &nbsp; if word == '':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; break</div><div>&nbsp; &nbsp; if word[0].isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; list_word.append(word[0].lower())</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; list_word.append(word[0])</div><div><br></div><div>print("You've entered")</div><div><br></div><div>for ch in set(list_word):</div><div>&nbsp; &nbsp; count = list_word.count(ch)</div><div>&nbsp; &nbsp; if ch.isalpha() and count &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count} strings starting with '{ch.upper()}' or '{ch}'")</div><div>&nbsp; &nbsp; elif ch.isalpha() and count == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count} string starting with '{ch.upper()}' or '{ch}'")</div><div>&nbsp; &nbsp; elif not ch.isalpha() and count &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count} strings starting with '{ch}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count} string starting with '{ch}'")</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:27:46 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121204701</guid>
      </item>
      <item>
         <title>Chan Yi Xuan</title>
         <author>yixuanchan20181</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121208262</link>
         <description><![CDATA[<div>strings_dict = {}</div><div>ch_present = []</div><div><br></div><div>string_input = input("Enter a string &gt; ")</div><div><br></div><div>while string_input != '':</div><div>&nbsp; &nbsp; first_ch = string_input[0:1] # [0:1] and [0] is DIFFERENT.&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if first_ch.isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; lower_first = first_ch.lower()</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if lower_first in strings_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings_dict[lower_first] += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ch_present.append(lower_first)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings_dict[lower_first] = 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if first_ch in strings_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings_dict[first_ch] += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ch_present.append(first_ch)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings_dict[first_ch] = 1</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; string_input = input("Enter a string &gt; ")</div><div>&nbsp; &nbsp;&nbsp;</div><div>print()</div><div>print("You've entered")</div><div><br></div><div>for ch in ch_present:</div><div>&nbsp; &nbsp; if ch.isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if strings_dict[ch] == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print('\t' + str(strings_dict[ch]) + " string starting with '" + ch.upper() + "' or '" + ch + "'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print('\t' + str(strings_dict[ch]) + " strings starting with '" + ch.upper() + "' or '" + ch + "'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if strings_dict[ch] == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print('\t' + str(strings_dict[ch]) + " string starting with '" + ch + "'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print('\t' + str(strings_dict[ch]) + " strings starting with '" + ch + "'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:31:11 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121208262</guid>
      </item>
      <item>
         <title>Jon Tiong</title>
         <author>jontiong2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121208320</link>
         <description><![CDATA[<div>inputstring = input("Enter a string &gt; ")</div><div>if len(inputstring) == 0:</div><div>&nbsp; &nbsp; False</div><div>else:</div><div>&nbsp; &nbsp; key = inputstring[0].lower()</div><div>stringdict = {}</div><div>stringdict[key] = [inputstring]</div><div>while len(inputstring) &gt; 0:</div><div>&nbsp; &nbsp; inputstring = input("Enter a string &gt; ")</div><div><br></div><div>&nbsp; &nbsp; if len(inputstring) == 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; break&nbsp;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; key = inputstring[0].lower()</div><div>&nbsp; &nbsp; if key in stringdict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; stringdict[key].append(inputstring)</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; key = inputstring[0].lower()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; stringdict[key] = [inputstring]</div><div><br></div><div>print("You've entered")</div><div>for key in stringdict:</div><div>&nbsp; &nbsp; if key in "abcdefghijklmnopqrstuvvwxyz":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{len(stringdict[key])} strings starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{len(stringdict[key])} strings starting with '{key}'")</div><div><br></div><div>&nbsp; &nbsp;&nbsp;</div><div><br><br><br><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:31:13 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121208320</guid>
      </item>
      <item>
         <title>Pan Myatt Noe</title>
         <author>mnpan</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121211081</link>
         <description><![CDATA[<div>import string</div><div><br></div><div>a_string = input("Enter a string &gt; ")</div><div><br></div><div>str_dict = {}</div><div><br><br></div><div>while a_string != '':</div><div>&nbsp; &nbsp; if a_string.lower()[0] not in str_dict.keys():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; str_dict[a_string.lower()[0]] = 1</div><div>&nbsp; &nbsp; elif a_string.lower()[0] in str_dict.keys():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; str_dict[a_string.lower()[0]] += 1</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; a_string = input("Enter a string &gt; ")</div><div><br></div><div>print("You've entered")</div><div>for key, value in str_dict.items():</div><div>&nbsp; &nbsp; if value == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if key in string.ascii_letters:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t {value} string starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t {value} string starting with '{key}'")</div><div>&nbsp; &nbsp; elif value &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if key in string.ascii_letters:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t {value} strings starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t {value} string starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:33:44 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121211081</guid>
      </item>
      <item>
         <title>tian xin</title>
         <author>tianxinyu2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121211661</link>
         <description><![CDATA[<div>a_string = input("Enter a string &gt; ")</div><div>new_dict = {}</div><div><br></div><div>while len(a_string) != 0:</div><div>&nbsp; &nbsp; starting = a_string[0].lower()</div><div>&nbsp; &nbsp; if starting not in new_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; new_dict[starting] = 1&nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; else:&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; new_dict[starting] += 1</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; a_string = input("Enter a string &gt; ")</div><div><br></div><div>print("You've entered")</div><div>for key, value in new_dict.items():</div><div>&nbsp; &nbsp; <em># value = new_dict[key]</em></div><div><br></div><div>&nbsp; &nbsp; if value &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; use = 'strings'</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; use = 'string'</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; print(<strong>f</strong>'\t {str(value)} {use} starting with "{key.lower()}" or "{key.upper()}"')</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:34:14 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121211661</guid>
      </item>
      <item>
         <title>Seah Yu Xuan</title>
         <author></author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121221810</link>
         <description><![CDATA[<div>ans = input('Enter a string &gt; ')</div><div>list1 = []</div><div><br></div><div>while len(ans) &gt; 0:</div><div>&nbsp; &nbsp; list1.append(ans.lower())</div><div>&nbsp; &nbsp; ans = input('Enter a string &gt; ')</div><div><br></div><div>startlist = []</div><div>for element in list1:</div><div>&nbsp; &nbsp; startlist.append(element[0])</div><div><br><br></div><div>count_dict = {}</div><div>for element2 in startlist: # s, m, $, 3, p&nbsp;</div><div>&nbsp; &nbsp; if element2 not in count_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count_dict[element2.lower()] = 1</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count_dict[element2.lower()] += 1</div><div><br></div><div>print()</div><div>print("You've entered")</div><div>for key in count_dict:</div><div>&nbsp; &nbsp; if key.isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if count_dict[key] &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count_dict[key]} strings starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if count_dict[key] == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count_dict[key]} string starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if count_dict[key] &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count_dict[key]} strings starting with '{key}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if count_dict[key] == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{count_dict[key]} string starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:43:04 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121221810</guid>
      </item>
      <item>
         <title>Gavin Tay</title>
         <author>Gavin_Tay_Kai_Kang</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121222691</link>
         <description><![CDATA[<div><br><br>str = input("Enter a string &gt; ")<br>my_dict = {}<br>count = 0<br>while str != "":<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; first_letter = str[0].lower()<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; if first_letter not in my_dict:<br>&nbsp; &nbsp; &nbsp; &nbsp; my_dict[first_letter] = 1<br>&nbsp; &nbsp; else:<br>&nbsp; &nbsp; &nbsp; &nbsp; my_dict[first_letter] += 1<br>&nbsp; &nbsp; str = input("Enter a string &gt; ")<br><br>print()<br>print("You've entered")<br>for key,value in my_dict.items():<br>&nbsp; &nbsp; if value == 1:<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} string starting with {key.upper()} or {key.lower()}")<br>&nbsp; &nbsp; elif value &gt; 1:<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with {key.upper()} or {key.lower()}")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:43:45 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121222691</guid>
      </item>
      <item>
         <title>Edmund</title>
         <author>edmundwoon2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121223090</link>
         <description><![CDATA[<div>import string</div><div>input_string = input("Enter a string ")</div><div><br></div><div>valid_char = string.ascii_letters</div><div>dict = {}</div><div><br></div><div>while input_string != "":</div><div><br></div><div>&nbsp; &nbsp; start = input_string[0]</div><div><br></div><div>&nbsp; &nbsp; if start in valid_char:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; key = "'" + start.upper() + "' or '" + start.lower() + "'"</div><div><br></div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; key = "'" + start + "'"</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if key not in dict:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; dict[key] = 1</div><div><br></div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; value = dict[key]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; value += 1</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; dict[key] = value</div><div><br></div><div>&nbsp; &nbsp; input_string = input("Enter a string ")</div><div><br><br></div><div>print('You have entered')</div><div><br></div><div>for key,value in dict.items():</div><div>&nbsp; &nbsp; if value == 1:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f'\t {value} string starting with {key}')</div><div><br></div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f'\t {value} strings starting with {key}')</div><div><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:44:05 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121223090</guid>
      </item>
      <item>
         <title>Edmund</title>
         <author>edmundwoon2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121223668</link>
         <description><![CDATA[<div>def time_conversion (time):</div><div><br></div><div>&nbsp; &nbsp; split_time = time.split(':')</div><div><br></div><div>&nbsp; &nbsp; hour = int(split_time[0])</div><div><br></div><div>&nbsp; &nbsp; minute = int(split_time [1])</div><div><br></div><div>&nbsp; &nbsp; seconds = split_time[2]</div><div><br></div><div>&nbsp; &nbsp; if "AM" in seconds:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if hour != 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if seconds [0:2] != "00":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; elif hour == 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour -=12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if seconds [0:2] != "00":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><br></div><div>&nbsp; &nbsp; elif "PM" in seconds:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if hour != 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if seconds [0:2] != "00":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour += 12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour += 12</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if seconds [0:2] != "00":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if seconds != "00":</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute += 1</div><div><br></div><div>&nbsp; &nbsp; return 60 * hour + minute</div><div><br><br></div><div>def count_emails (file_name, start_time, end_time, sender):</div><div><br><br><br></div><div>&nbsp; &nbsp; with open(file_name) as my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in my_file:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip('\n')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.split('\t')</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sender_file = line [1]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = time_conversion(line[0])</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_time_convert = start_time[0] * 60 + start_time[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_time_convert = end_time [0] * 60 + end_time [1]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sender == sender_file:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if time &gt;= start_time_convert and time &lt;= end_time_convert:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div><br></div><div>&nbsp; &nbsp; return count</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:44:31 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121223668</guid>
      </item>
      <item>
         <title>Regin Ng</title>
         <author>regin_ng_2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121224332</link>
         <description><![CDATA[<div>string = input('Enter a string : ')</div><div>count_dict = {}</div><div><br></div><div>while not (string == '') :</div><div><br></div><div>&nbsp; &nbsp; first_chr = string[0].lower()</div><div><br></div><div>&nbsp; &nbsp; if first_chr in count_dict :</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; count_dict[first_chr] += 1</div><div><br></div><div>&nbsp; &nbsp; else :</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count_dict[first_chr] = 1</div><div><br></div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; string = input('Enter a string : ')</div><div><br></div><div>print("You've entered : ")</div><div><br></div><div>for k, v in count_dict.items() :</div><div><br></div><div>&nbsp; &nbsp; if k.isalpha() :</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"{v} strings starting with '{k.upper()}' or '{k}'")</div><div><br></div><div>&nbsp; &nbsp; else :</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"{v} strings starting with '{k}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:45:02 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121224332</guid>
      </item>
      <item>
         <title>guang guo</title>
         <author></author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121224516</link>
         <description><![CDATA[<div>import string</div><div><br></div><div>dict = {}</div><div><br></div><div>user_string = input("Enter a string &gt; ")</div><div><br></div><div>while user_string != '':</div><div>&nbsp; &nbsp; first_char = user_string[0]</div><div>&nbsp; &nbsp; first_char = first_char.lower()</div><div>&nbsp; &nbsp; if first_char not in dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dict[first_char] = 1</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count = int(dict[first_char])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dict[first_char] = count</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; user_string = input("Enter a string &gt; ")</div><div><br></div><div>print("You've entered")</div><div>for key,value in dict.items():</div><div>&nbsp; &nbsp; if value &gt; 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; stri = 'strings'</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; stri = 'string'</div><div>&nbsp; &nbsp; if key in string.ascii_letters:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} {stri} starting with '{key.upper()}' or '{key}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} {stri} starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 10:45:12 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121224516</guid>
      </item>
      <item>
         <title>Sylvia Loo Xin Yi</title>
         <author>sylvialoo2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121638653</link>
         <description><![CDATA[<div>string = "a"<br># Is assigning the string a random value okay so it can directly enter the while loop?<br>my_dict = {}<br>while string != "":<br>&nbsp; &nbsp; string = (input("Enter a string &gt;")).lower()<br>&nbsp; &nbsp; if len(string) &gt; 0:<br>&nbsp; &nbsp; &nbsp; &nbsp; first_letter = string[0]<br>&nbsp; &nbsp; &nbsp; &nbsp; if first_letter not in my_dict:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; my_dict[first_letter] = 1<br>&nbsp; &nbsp; &nbsp; &nbsp; else:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; my_dict[first_letter] += 1<br><br><br>print("You have entered")<br>for key,values in my_dict.items():<br>&nbsp; &nbsp; if values == 1 and key.isalpha():<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{values} string starting with '{key.upper()}' or '{key.lower()}'")<br><br>&nbsp; &nbsp; elif values &gt; 1 and key.isalpha():<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{values} strings starting with '{key.upper()}' or '{key.lower()}'")<br><br>&nbsp; &nbsp; elif values == 1 and not key.isalpha():<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{values} string starting with '{key}'")<br><br>&nbsp; &nbsp; else:<br>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{values} strings starting with '{key}'")<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 14:40:47 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121638653</guid>
      </item>
      <item>
         <title>Matthew Tee</title>
         <author>matthewtee2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121832898</link>
         <description><![CDATA[<div>word_dict = {}</div><div><br></div><div>inp_str = input("Enter a string &gt; ")</div><div><br></div><div>while inp_str != '':</div><div>&nbsp; &nbsp; first_chr = inp_str[0]</div><div><br></div><div>&nbsp; &nbsp; if first_chr in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; first_chr = first_chr.lower()</div><div><br></div><div>&nbsp; &nbsp; if first_chr not in word_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; word_dict[first_chr] = [inp_str]</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; word_dict[first_chr].append(inp_str)</div><div><br></div><div>&nbsp; &nbsp; inp_str = input("Enter a string &gt; ")</div><div><br></div><div>print("You've entered")</div><div>for k, v in word_dict.items():</div><div>&nbsp; &nbsp; if k in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ': # is.alpha() and is.digit()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(v) == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{len(v)} string starting with '{k.upper()}' or '{k}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{len(v)} strings starting with '{k.upper()}' or '{k}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(v) == 1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{len(v)} string starting with '{k}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{len(v)} string starting with '{k}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 16:13:48 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121832898</guid>
      </item>
      <item>
         <title>Matthew Tee</title>
         <author>matthewtee2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2121833928</link>
         <description><![CDATA[<div>def count_emails(file_name, start_time, end_time, sender): # convert to seconds</div><div>&nbsp; &nbsp; start_time_sec = (start_time[0]*60*60) + (start_time[1]*60)</div><div>&nbsp; &nbsp; end_time_sec = (end_time[0]*60*60) + (end_time[1]*60)</div><div><br></div><div>&nbsp; &nbsp; counter = 0</div><div><br></div><div>&nbsp; &nbsp; with open(file_name) as input_f:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in input_f:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip('\n')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.split('\t') # [ts, sender, recipient]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_stamp = line[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sen = line[1]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sen == sender:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_stamp = time_stamp.split(':') # [12,45,30PM]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(time_stamp[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minute = int(time_stamp[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = time_stamp[2]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if len(sec) &gt; 2:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sec[2:] == "PM" and hour != 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour += 12</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = int(sec[0:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_sec = (hour*60*60) + (minute*60) + int(sec)</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if start_time_sec &lt;= time_sec &lt;= end_time_sec:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter += 1</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; return counter</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-30 16:14:15 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2121833928</guid>
      </item>
      <item>
         <title>Grace Ang Pei Shan</title>
         <author>graceang2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2122609412</link>
         <description><![CDATA[<div>user_str = input("Enter a string &gt; ")</div><div>new_dict = {}</div><div>while user_str != "":</div><div>&nbsp; &nbsp; lower_user_str = user_str.lower()</div><div>&nbsp; &nbsp; first_str = lower_user_str[0]</div><div>&nbsp; &nbsp; if first_str not in new_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; new_dict[first_str] = 1</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; new_dict[first_str] += 1</div><div>&nbsp; &nbsp; user_str = input("Enter a string &gt; ")</div><div>print("You've entered")</div><div>for key, value in new_dict.items():</div><div>&nbsp; &nbsp; if key.isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key.upper()}' or '{key.lower()}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key}'")</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 01:47:49 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2122609412</guid>
      </item>
      <item>
         <title>Jon Tiong</title>
         <author>jontiong2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123206030</link>
         <description><![CDATA[<div>def count_emails(file_name, start_time,end_time,sender):</div><div>&nbsp; &nbsp; with open(file_name) as my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; newdict = {}</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #print(line.rstrip("\n").split("\t"))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time,sender,recipient = line.strip().split("\t")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour, minute, second = time.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if "PM" in second and int(hour) &lt; 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; second = second[:1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = (int(hour) + 12, int(minute))</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = (int(hour), int(minute))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; second = second[:1]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sender not in newdict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newdict[sender] = [time]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newdict[sender].append(time)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #print(time)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(newdict)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(second)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for time in newdict[sender]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print(start_time[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print(time[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print(end_time[0])&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if start_time[0] &lt;= time[0] &lt;= end_time[0]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif time[0] == end_time[0] and time[1] &lt;= end_time[1]:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif time[0] == end_time[0] and time[1] == end_time[1] and int(second) == 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count +=1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return count<br><br>something doesnt work and i am sad</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 09:07:05 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123206030</guid>
      </item>
      <item>
         <title>Sylvia Loo Xin Yi</title>
         <author>sylvialoo2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123225139</link>
         <description><![CDATA[<div>def count_emails(file_name,start_time,end_time,sender):<br>&nbsp; &nbsp; with open(file_name) as my_file:<br>&nbsp; &nbsp; &nbsp; &nbsp; valid_sender = []<br>&nbsp; &nbsp; &nbsp; &nbsp; for line in my_file:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip("\n")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; columns = line.split("\t")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sender_email = columns[1]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # start_list = start_time.split(":")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # end_list = end_time.split(":")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_time = int(start_time[0:2]) * 60 * 60 + int(start_time[3:5]) * 60 +int(start_time[6:])<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_time = int(end_time[0:2]) * 60 * 60 +int(end_time[3:5]) * 60 + int(end_time[6:])<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sender_email == sender:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valid_sender.append(line)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count = 0<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for valid_emails in valid_sender:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; recipient_email = columns[2]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = columns[0]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hours = time[0:2]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if int(hours) &lt; 12 and "PM" in time:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hours = (int(time[0:2]) + 12) * 60 * 60<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif hours == 12 and "AM" in time:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hours = 0<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hours = (int(time[0:2]) + 12) * 60 * 60<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mins = int(time[3:5]) * 60<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; secs = int(time[6:])<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total_time = hours + mins + secs<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if total_time &gt;= start_time and total_time &lt;= end_time:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1<br>&nbsp; &nbsp; &nbsp; &nbsp; return count</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 09:21:21 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123225139</guid>
      </item>
      <item>
         <title>Valerie Lai</title>
         <author>valerielai2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123503047</link>
         <description><![CDATA[<div>from string import ascii_lowercase</div><div><br></div><div>count_dict ={}</div><div>prompt = input('Enter a string &gt;').lower()</div><div>str_list = [prompt]</div><div>while prompt != '':</div><div>&nbsp; &nbsp; prompt = input('Enter a string &gt;').lower()</div><div>&nbsp; &nbsp; str_list.append(prompt)</div><div><br></div><div>for string in str_list[:-1]:</div><div>&nbsp; &nbsp; first_letter = string[0]</div><div>&nbsp; &nbsp; if first_letter not in count_dict.keys():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count_dict[first_letter] = 1</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count_dict[first_letter] += 1</div><div>print(count_dict)</div><div>print("You've entered")</div><div>for key in count_dict:</div><div>&nbsp; &nbsp; if count_dict[key] ==1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; add_s = 'string'</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; add_s = 'strings'</div><div><br></div><div>&nbsp; &nbsp; if key in ascii_lowercase:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t {count_dict[key]} {add_s} starting with '{key.upper()}' or'{key}'")</div><div><br></div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t {count_dict[key]} {add_s} starting with '{key}'")</div><div>&nbsp; &nbsp; &nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 12:45:38 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123503047</guid>
      </item>
      <item>
         <title>Grace Ang Pei Shan</title>
         <author>graceang2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123569451</link>
         <description><![CDATA[<div>def count_emails(file_name, start_time, end_time, sender):</div><div>&nbsp; &nbsp; start_time_seconds = ((start_time[0] * 60 * 60) + (start_time[1] * 60)) &nbsp;</div><div>&nbsp; &nbsp; end_time_seconds = ((end_time[0] * 60 * 60) + (end_time[1] * 60)) &nbsp;</div><div>&nbsp; &nbsp; count = 0</div><div><br></div><div>&nbsp; &nbsp; with open(file_name, "r") as input_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in input_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip("\n") # ['12:30:00', 'joe@abc.com', 'jerry@abc.com']</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; columns = line.split("\t")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_stamp = columns[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_sender = columns[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; recipient = columns[2] # ['12', '30','00'] ['12','45','30PM']</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = time_stamp.split(":")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = time[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minutes = time[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; seconds = time[2]&nbsp; # 00 30PM</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if "PM" in str(seconds):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if hour != 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour_in_seconds = int(hour) + 12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_seconds_pm = seconds.replace("PM", "")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_time_in_seconds = ((hour_in_seconds * 60 * 60) + (int(minutes) * 60) + int(new_seconds_pm))</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if "AM" in str(seconds):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if int(hour) == 12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_seconds_am = seconds.replace("AM", "")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_time_in_seconds = ((int(hour) * 60 * 60) + (int(minutes) * 60) + int(new_seconds_am))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(hour) + int(12)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; seconds = int(seconds[0:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_time_in_seconds = ((int(hour)*60*60) + (int(minutes)*60) + int(seconds))</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if not ("AM" in str(seconds) or "PM" in str(seconds)):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email_time_in_seconds = ((int(hour) * 60 * 60) + (int(minutes) * 60) + int(seconds))</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (email_time_in_seconds &gt;= start_time_seconds) and (email_time_in_seconds &lt;= end_time_seconds):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if email_sender == sender:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return count</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 13:20:01 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123569451</guid>
      </item>
      <item>
         <title>Valerie Lai</title>
         <author>valerielai2019</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123597017</link>
         <description><![CDATA[<div>def count_emails(file_name, start_time, end_time, sender):</div><div>&nbsp; &nbsp; with open(file_name,'r') as my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; start_time_sec = start_time[0]*3600 + start_time[1]*60</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end_time_sec = end_time[0]*3600 + end_time[1]*60</div><div>&nbsp; &nbsp; &nbsp; &nbsp; emails = []</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; col = line.rstrip('\n').split('\t')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_stamp = col[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sender_ID = col[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #split and remove AM or PM&nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour,min,sec=time_stamp[:8].split(':')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if 'PM' in time_stamp and time_stamp[:2]!='12':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = str(int(hour)+12)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif 'AM' in time_stamp and time_stamp[:2] =='12':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = '00'</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_stamp_sec = int(hour)*3600 + int(min)*60 + int(sec)</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if start_time_sec&lt;=time_stamp_sec&lt;=end_time_sec:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emails.append(sender_ID)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for email in emails:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if email == sender:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count+=1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return count</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 13:33:35 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123597017</guid>
      </item>
      <item>
         <title>SEAH YU XUAN</title>
         <author></author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123730116</link>
         <description><![CDATA[<div>def count_emails(input_file, start, end, email):</div><div>&nbsp; &nbsp; counter = 0</div><div>&nbsp; &nbsp; start_in_sec = int((start[0] * 3600) + (start[1] * 60))</div><div>&nbsp; &nbsp; end_in_sec = int((end[0] * 3600) + (end[1] * 60))</div><div>&nbsp; &nbsp; with open (input_file, 'r') as inputfile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in inputfile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = line.rstrip('\n').split('\t')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mail = line[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = line[0].split(':')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hr = int(time[0])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min = int(time[1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = time[2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if 'AM' in sec or 'PM' in sec:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = int(sec[0:2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = int(sec)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if 'PM' in time[2]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if 1 &lt;= hr &lt;= 11:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totalsec = ((hr+12)*3600) + (min*60) + sec</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totalsec = (hr*3600) + (min*60) + sec</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif 'AM' in time[2]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if 1 &lt;= hr &lt;= 11:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totalsec = (hr*3600) + (min*60) + sec</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totalsec = 0 + (min*60) + sec</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totalsec = (hr*3600) + (min*60) + sec</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if start_in_sec &lt;= totalsec &lt;= end_in_sec and mail == email:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter += 1</div><div>&nbsp; &nbsp; return counter</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 14:34:58 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123730116</guid>
      </item>
      <item>
         <title>caijun</title>
         <author>caijunng2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123765955</link>
         <description><![CDATA[<div>stringg=input('Enter a string &gt; ')</div><div><br></div><div>thedictionary={}</div><div>while stringg!= '':</div><div>&nbsp; &nbsp; stringg=stringg.lower()</div><div>&nbsp; &nbsp; if stringg[0] not in thedictionary:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; thedictionary[stringg[0]]=[stringg]</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; thedictionary[stringg[0]].append(stringg)</div><div>&nbsp; &nbsp; stringg=input('Enter a string &gt; ')</div><div><br></div><div>print("You've entered")</div><div>for k,v in thedictionary.items():</div><div>&nbsp; &nbsp; if k.isalpha()==True:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(v)&gt;1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"{len(v)} strings starting with '{k.upper()}' or '{k}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"1 string starting with '{k.upper()}' or '{k}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if len(v)&gt;1:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"{len(v)} strings starting with '{k}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(f"1 string starting with '{k}'")</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 14:51:52 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123765955</guid>
      </item>
      <item>
         <title>caijun</title>
         <author>caijunng2021</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2123766384</link>
         <description><![CDATA[<div>## Q2: Count Emails</div><div># write your code below</div><div>from sqlite3 import Timestamp</div><div><br><br><br></div><div>def count_emails(file_name,start_time,end_time,sender):</div><div>&nbsp; &nbsp; startimeseconds=start_time[0]*60*60+ start_time[1]*60</div><div>&nbsp; &nbsp; endtimeseconds=end_time[0]*60*60+ end_time[1]*60</div><div>&nbsp; &nbsp; count=0</div><div>&nbsp; &nbsp; with open (file_name,'r') as thefile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in thefile:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line=line.rstrip('\n')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line=line.split('\t')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timestamp=line[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timestamp=timestamp.split(':')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if 'PM' in timestamp[2]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timestamp[2]=timestamp[2][:-2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if int(timestamp[0])!=12:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timestamp[0]=int(timestamp[0])+12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif 'AM' in timestamp[2]:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timestamp[2]=timestamp[2][:-2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeinseconds=int(timestamp[0])*60*60 + int(timestamp[1])*60 + int(timestamp[2])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emailsender=line[1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emailreceiver=line[2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if emailsender==sender and timeinseconds&gt;=startimeseconds and timeinseconds&lt;=endtimeseconds:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count+=1</div><div>&nbsp; &nbsp; return count</div><div><br><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-03-31 14:52:05 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2123766384</guid>
      </item>
      <item>
         <title>Joel Kang</title>
         <author>joelkang2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2125287548</link>
         <description><![CDATA[<div>str = input('Enter a string &gt; ')</div><div>str_list = []</div><div>new_dict = {}</div><div>valid_characters = 'abcdefghijklmnopqrstuvwxyz'</div><div><br></div><div>while not (str.lower() == ''):</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; first_letter = str[0].lower()</div><div><br></div><div>&nbsp; &nbsp; if first_letter not in new_dict:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; new_dict[first_letter] = 1</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; new_dict[first_letter] += 1 #This adds to the count value</div><div><br></div><div>&nbsp; &nbsp; str = input('Enter a string &gt; ')</div><div><br></div><div>print("You've entered")</div><div><br></div><div>for key,value in new_dict.items():</div><div>&nbsp; &nbsp; if key.isalpha():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print (f"\t{value} strings starting with '{key.upper()}' or '{key.lower()}'")</div><div>&nbsp; &nbsp; elif key.isdigit():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key}'")</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(f"\t{value} strings starting with '{key}'")</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-04-01 11:47:48 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2125287548</guid>
      </item>
      <item>
         <title>Joel Kang</title>
         <author>joelkang2020</author>
         <link>https://padlet.com/michellekan/is111week12/wish/2125287775</link>
         <description><![CDATA[<div>## Q2: Count Emails</div><div># write your code below</div><div>def count_emails(file_name,start_time,end_time,sender):</div><div>&nbsp; &nbsp; with open (file_name,'r') as my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; count = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; for line in my_file:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; column = line.rstrip('\n').split('\t')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time = column[0]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sender_name = column[1]</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sender_name == sender:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour = int(time.split(':')[0]) #12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min = int(time.split(':')[1]) #30</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = time.split(':')[2] #30pm or 00</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if len(sec) &gt; 2:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sec[2:4]&nbsp; == 'PM':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour += 12</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = sec[0:2]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if sec[2:4] == 'AM':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sec = sec[0:2]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if hour &gt;= 24:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour -= 12</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hour_sec = hour * 3600</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min_sec = min * 60</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total_sec = hour_sec + min_sec + int(sec)</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_time_sec = int(start_time[0]) * 3600 + int(start_time[1]) * 60</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_time_sec = int(end_time[0]) * 3600 + int(end_time[1]) * 60</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if total_sec &gt;= start_time_sec and total_sec &lt;= end_time_sec:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count += 1</div><div>&nbsp; &nbsp; return count</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-04-01 11:48:00 UTC</pubDate>
         <guid>https://padlet.com/michellekan/is111week12/wish/2125287775</guid>
      </item>
   </channel>
</rss>
