The "Datine age" challenge.

0 Khaled Ashraf Elmaleh · June 8, 2015
It was simpler than I thought.
I just don't remember how can I make a range of values in a set.

BUT, here you go. xD

/images/forum/upload/2015-06-08/4c3048ed78a757c58633368b927f13a2.PNG

Post a Reply

Replies

Oldest  Newest  Rating
0 Tim Samuel · June 11, 2015
This was pretty simple once you had the allowed_dating_age function set up already.

Here's what I came up with...

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



for x in range(15, 60):
print('A guy aged', x, 'can date girls ', allowed_dating_age(x), 'years old or older.')
  • 1

Python

106,990 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator