Hi guys , i'm trying to solve this problem
CentauriPrime<https://code.google.com/codejam/contest/1277486/dashboard#s=p0>
.
But when i submitted my solution , the judged response was [INCORRECT] [?]
This is my python source :

from os import sys

vowels = ['a', 'e', 'i', 'o', 'u', 'y']

def ruleBy(data):
   with open(data) as fd :
      cases = int(fd.readline())
      for n in range(cases):
         line = fd.readline().strip()
         #if len(line) >= 3 and len(line) <=100 :
         print "Case #%d: %s" %(n+1,ruler(line))

def ruler(line):
   if line[-1] in vowels and line[-1] != 'y':
      return "%s is ruled by a queen." %(line,)
   elif line[-1] in vowels :
       return "%s is ruled by a nobody." %(line,)
   else:
       return "%s is ruled by a king." %(line,)

if __name__ == '__main__':
   ruleBy(sys.argv[1])


Please tell me what's wrong .

-- 
Josue Brunel

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

<<320.gif>>

Attachment: sol.py
Description: Binary data

Reply via email to