Assignment 3 Part 1 (submitted by Jason on Feb 9, 16:37)

Beautiful Code
Ka-Ping Yee

AUTHORS:   Adam   Calvin   Chris   David   Derek   Hunter   Jacob   Jason   Jun   Karl   Kevin   Michael   Morgan   Nadia   Nerissa   Omair   Peter   Peterson   Ping   Richard   Rosie   Scott   Thanh   Varun

Download this file.

COMMENTS

Feb 17, 21:35 - Jacob (line 7): This is where I think your program needs work - you don't check any of the punctuation/validity stuff

Feb 17, 21:35 - Jacob (line 10): This is a cool way to do output!

Feb 22, 17:50 - Ping (line 4): You can write the empty string as ''.

Feb 22, 17:51 - Ping (line 3): You can write the empty list as [].

Please log in if you would like to add comments.

   

  1 import speling
  2 file = open('input.txt')
  3 misspelled = list()
  4 last = str()
  5 for line in file:
  6         words = line.split()
  7         for word in words:
  8             if type(speling.splCheck(word)) == type(None):
  9                 misspelled.append(word)
 10 for word in misspelled.sort():
 11     if word.lower() != last.lower():
 12         print word + ' (' + str(misspelled.count(word)) + ')'
 13     last = word