Personal Information X32497


Statement
 

pdf   zip

Write a function @check_personal(n, a, e)@ that receives information about a person: (a string nn containing the person name, an integer aa containing her age, and a boolean ee stating whether she is enroled in ProAl1), and returns a boolean that contains whether the person is at least 20 years old and either her name starts with ‘M’ or she is enroled in ProAl1 (or both things).

Sample session

Sample session
>>> check_personal("Maria", 22, True)
True
>>> check_personal("Joan", 19, False)
False
>>> check_personal("Miquel", 20, False)
True
>>> check_personal("Josep", 21, True)
True
>>> check_personal("Jaume", 18, True)
False
>>> check_personal("Julieta", 23, False)
False
Information
Author
ProAl
Language
English
Official solutions
Python
User solutions
Python