fork download
  1. def can_vote(age):
  2. """ (int) -> bool
  3. age=[18 and over]
  4. Precondition: age >= 0
  5.  
  6. Return True if and only if a person aged age can vote in Canada.
  7. The legal voting age in Canada is 18 years and older.
  8. """
  9.  
  10. return age > 18
  11.  
  12. can_vote(0)
  13. can_vote(18)
Success #stdin #stdout 0.03s 9676KB
stdin
Standard input is empty
stdout
Standard output is empty