SHARE
TWEET

Untitled

a guest Sep 19th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import datetime
  2.  
  3. n = int(input())
  4. i = int(0)
  5. student_name = []
  6. date1 = []
  7. date2 = []
  8. course = []
  9.  
  10. while i < n :
  11.     studentname = input()
  12.     student_name.append(studentname)
  13.     first_date = input()
  14.     year, month, day = map(int, first_date.split('/'))
  15.     date1.append(datetime.date(year, month, day).strftime("%Y/%m/%d"))
  16.     second_date = input()
  17.     year, month, day = map(int, second_date.split('/'))
  18.     date2.append(datetime.date(year, month, day).strftime("%Y/%m/%d"))
  19.     courses = int(input())
  20.     course.append(courses)
  21.     i+=1
  22.  
  23. i = int(0)
  24.    
  25. while i < n:
  26.     dt = datetime.datetime.strptime(date1[i], '%Y/%m/%d')
  27.     dt2 = datetime.datetime.strptime(date2[i], '%Y/%m/%d')
  28.     if int(dt.year) >= int(2010) :
  29.         if int(dt2.year) >= int(1991) :
  30.             print(student_name[i] + " " + "eligable")
  31.     elif course[i] >= int(41):
  32.         print(student_name[i] + " " + "ineligable")
  33.     else:
  34.         print(student_name[i] + " " + "coach petitions")
  35.     i+=1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top