Cheryl's birthday: Difference between revisions
Content added Content deleted
(→Functional Python: Minor tidying, reordering of comments.) |
|||
Line 1,423: | Line 1,423: | ||
(month, day) = (0, 1) |
(month, day) = (0, 1) |
||
print( |
print( |
||
⚫ | |||
# (3 :: A "Then I also know") |
# (3 :: A "Then I also know") |
||
⚫ | |||
uniquePairing(month)( |
uniquePairing(month)( |
||
⚫ | |||
# (2 :: B "I know now") |
# (2 :: B "I know now") |
||
⚫ | |||
uniquePairing(day)( |
uniquePairing(day)( |
||
# (A's month is not among those with unique days) |
|||
# (1 :: A "I know that Bernard does not know") |
# (1 :: A "I know that Bernard does not know") |
||
# (A's month is not among those with unique days) |
|||
monthsWithUniqueDays(False)([ |
|||
# 0 :: Cheryl's list: |
# 0 :: Cheryl's list: |
||
tuple(x.split()) for x in |
|||
split( |
|||
', ', |
|||
'May 15, May 16, May 19, ' + |
|||
'June 17, June 18, ' + |
|||
'July 14, July 16, ' + |
|||
'Aug 14, Aug 15, Aug 17' |
|||
) |
|||
]) |
|||
)) |
|||
) |
|||
) |
) |
||
) |
) |