Python 13 Programming Tutorial - Return Value

def allowed_dating_age(my_age):
    girls_age = my_age/2 + 7
    return girls_age

buckys_limit = allowed_dating_age(27)
creepy_joe_limit = allowed_dating_age(49)
print("Bucky can date girls", buckys_limit, "or older")
print("Creepy Joe can date girls", creepy_joe_limit, "or older")

'''
*** Challenge 2 ***
Display a list of the dating limits for guys 15-65 years old
Good luck!
'''

你可能感兴趣的:(Python 13 Programming Tutorial - Return Value)