From Carl Pittenger to Everyone: (2:20 PM)
 def endswith_case_insensitive(s, suffix): """s and suffix are strings returns True if s ends with suffix, case insensitive""" return s.lower()[-1] == suffix.lower() From Baeden Vester to Everyone: (2:22 PM) def format_name(first, last, middle): return (last + ", " + first + " " + middle[0]) From Luke Pollard to Everyone: (2:23 PM)
for the 2nd: if s.count(ch) > 1: return True else: return False From Chloe Monson to Everyone: (2:23 PM) def endswith_case_insensitive(s, suffix): sLower = s.lower() return sLower.endswith(suffix.lower()) From Carl Pittenger to Everyone: (2:23 PM) def median(x): """ x is a numerical list with an odd number of items returns the median of x""" x = sorted(x) return x[length // 2] From Sophia Benjamin to Everyone: (2:23 PM) def occurs_twice(s, ch):
 """s is a string, ch is a one-character string
 return True if ch occurs at least twice in s."""
 first = s.find(ch) last = s.rfind(ch) return not(first==last) From Leo Atalla to Everyone: (2:23 PM) def endswith_case_insensitive(s, suffix): return s.lower().endswith(suffix.lower()) From Carl Pittenger to Everyone: (2:24 PM) def occurs_twice(s, ch): """s is a string, ch is a one-character string return True if ch occurs at least twice in s.""" return s.count(ch) > 1 def format_name(first, last, middle): """ first, last are strings (name) return a sring for the form "last, first (middle initial)""" return last + ', ' + first + '(' + middle[0] + '.)' From Leo Atalla to Everyone: (2:25 PM) def format_name(first, last, middle): return f"{last}, {first} {middle[0]}."
the period 
 From Pranet Sharma to Everyone: (2:26 PM) def endswith(s, suffix): suffix = suffix.lower() s = s[len(s)-len(suffix):len(s)] print(s) print(suffix) if s == suffix: return True else: return False
 From Paul Warner to Everyone: (2:26 PM)
 def format_name(first, last, middle): """ first, last are strings (name) return a sring for the form "last, first (middle initial).""" From Leo Atalla to Everyone: (2:26 PM)
pranet you can juts do "return s==suffix" for the last few lines From Pranet Sharma to Everyone: (2:26 PM)
oop thanks From Chloe Monson to Everyone: (2:27 PM) def occurs_twice(s, ch): counted = s.count(ch) if counted >= 2: return True else: return False
 From Leo Atalla to Everyone: (2:28 PM)
return s.count(ch) > 1 From Pranet Sharma to Everyone: (2:29 PM)
 def occurs_twice(s, ch): check = s.count(ch) return check >= 2 From Leo Atalla to Everyone: (2:32 PM) def median(x): x.sort() return x[len(x)//2] def median(x): return sorted(x)[len(x)//2] From Pranet Sharma to Everyone: (2:36 PM)
math.median(x) (just for fun) From Pranet Sharma to Everyone: (2:37 PM)
It won't work for a list though From Carl Pittenger to Everyone: (2:37 PM)
But replicating math modules is more fun lol
*math functions
 From Pranet Sharma to Everyone: (2:37 PM)
^ agreed From Carl Pittenger to Everyone: (2:47 PM)
Oh I messed up with my original endswith function def endswith_case_insensitive(s, suffix): """s and suffix are strings returns True if s ends with suffix, case insensitive""" return s.lower()[-len(suffix)] == suffix.lower()