Python Programming Tutorial – 13 – Return Values

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –






48 responses to “Python Programming Tutorial – 13 – Return Values”

  1. Unknown Badshah Avatar

    def my_age(age):
    girl_age = age //2 + 5

    for age in range(15,61):
    print("If your age is "+ str(age)+" You can date girl of age "+ str(my_age(age))+ " Or older")

    it's the code 🙂

  2. . Wils00n Avatar

    Def allowed_dating_age(my age)
    girls_age = my_age/2+7
    return girls_age
    my_limit = allowed_dating_age(15)
    print("I can date girls", my_limit, " or older")

  3. Abby Avatar

    4:31 "I don't have any friends at all" – When life hits you hard

  4. billa rauf Avatar

    Creating an array dynamically and passing all values to function
    def fun(age):
    allowed = age/2 + 7
    return allowed
    for x in range(40, 50, 1):
    Ans = fun(x)

  5. amr foda Avatar

    ok … my limit is 26.5 or older
    hahahaha i had never dated any females nor males ofcourse

  6. Hamza Rana Avatar

    Can not understand this one. All the previous tutorials were crystal clear.
    Having too much confusion with Return.
    And everyone in the comment section are blabbing on about girls age, dating etc. Useless people.

  7. Manish Vyas Avatar

    for x in range(18,50):
    print x,"can date age",allowed_age,"or older"

  8. Manish Sharma Avatar

    No one can beat the Bucky's commentary

  9. Darris Hawks Avatar

    def allowed_dating_age(your_age):
    potential_partner_age = your_age / 2 + 7
    return potential_partner_age
    for i in range(14,71):
    print("Someone aged ", i, "can date someone aged ", allowed_dating_age(i), "or older")

  10. malla 8848 Avatar

    Hey everyone : this is with function call and return . Also asks user for age

    def her_age_function ():
    print("How old are you ?")
    x = float(input())
    allowed_age = x/2+7
    return allowed_age

    print('You are allowed to date girls', her_age_function(), 'years old or older')

  11. John H Avatar

    i can be your friend bucky

  12. Talha Ch Avatar

    an awesome equation 😀 😀

  13. Luis Santos Avatar

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

    #adds ages of the guys
    ages = []

    #append the ages of the guys in a list
    for f in range(15,61):

    #This is used as a table header
    print("Guy Girl")

    #loop through the list and print their respective limit
    for f in ages:
    print(f," ",allowed_dating_age(f))

  14. YouwillneverdefeattheriddleoftheBlackRiders Avatar

    when i was 16 i liked 16 year old girls. when i got older that never changed so now i still do.

  15. RedDeadBret Avatar

    So a 23 year old like myself can date an 18 year old? That's social suicide!

  16. Duncan Wallace Avatar

    Thanks Bucky, for some reason Return was confusing me when its actually quite simple, after you explained it. Hope your helpfulness turns into karma & you get a date.

  17. Arch5tanton Avatar

    Like seriously, I'm a 400 year old vampire, you know how hard it is to find a date on plenty of fish?

  18. fair Avatar

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

    for guys_age in range(15,61):
    print("a", guys_age, "year old", "may date a girl as young as", allowed_dating_age(guys_age))

  19. Daniel Guerreiro Avatar

    def list_dating_age(age):
    girls_age = age / 2 + 7
    return girls_age

    for age in range(15, 50):
    limit = int(list_dating_age(age))
    print('The limit for {} is {}.'.format(age, limit))

  20. Hugh Mungus Avatar

    I can date 16 year olds.
    In my country I genuinely can too.
    Still a bit too weird though lmao. Think I'll wait a bit before applying this formula to my life.

  21. Akshay Kadav Avatar

    How to take input from the user bucky!!!! I couldn't find it anywhere in your 56 Tuts 🙁

  22. Comrade Punikki Avatar

    def function():
    for age in range(15,66):
    limit = age/2+7
    print(age, "is allowed to date", limit)


  23. abu saker Avatar

    def zenith(all):
    return age
    for f in range(20,70):
    print("a man with age ",f,"can date a girl whose age is",zenith(f),end='')

  24. collegetv Avatar

    I am pissed about this ad of udemy, everytime it pops up I can feel my ear bursting

  25. Lakhdeep singh Avatar

    I'm 20 now, so minimum age of girl i can date is 17..!
    By the thank you Bucky Roberts You are really cool and amazing teacher..!

  26. pstststs Avatar

    no python, no Chicks.
    Greetings from Greece

  27. Extra Bass Avatar

    u haven't defined some of those variables waaaaaaaa

  28. Gera Sanz Avatar

    i improved the age calculating system to this new one

    girls_age = (my_age//2) + (my_age//3)

    The double // its to round the number down, and you'll never gonna have a weird gap nor being lesser than the counter part, for a 15yr old person, will be dating a 12yr old, and a 50yr old , will be dating a 41

  29. chao sui Avatar

    return means store its value from the function and use it later

  30. nicholas ladefoged Avatar

    made this with a list like u said 🙂

    def allowed_dating_age(age):
    return age/2 + 7

    ages = []
    for i in range(60,71):

    for i in range(0,len(ages)):
    print("age:", ages[i], "can date", allowed_dating_age(ages[i]), "or older")

  31. Uncle Fkr Avatar

    That is one of the stupidest "rules" I've ever heard of. If both people are adults the age difference means nothing. With 2 consenting adults the "age" gap isn't creepy. That is incredibly simple minded of you. Smh.

  32. Robert Bhandari Avatar

    Negative creeps will never know his contribution is saving millions students life every year.

  33. Kuldeep Sharma Avatar

    I can date 14.5 years old Girl

  34. TheBostonGuy Avatar

    def allowedAgeToDate(myAge):
    allowedAge = myAge/2
    return allowedAge

    # Print allowed age to date a girl from year 15 to 60
    for i in range(15, 61):
    print('Age', i, 'is allowed to date a girl of the age', allowedAgeToDate(i), 'or older')

  35. Zich Houssam Avatar

    def allowd_deting_age():

    for my_age in range(15,60):


  36. Ikjyot Singh Avatar

    def allowed_age(x):
    girls_age = x/2 +7
    return girls_age

    for x in range(15,61):
    limit = allowed_age(x)
    print('if your age is', x, 'you can date', limit, 'or older')

  37. asamsu1 Avatar

    def age_aloowed(my_age):
    girlsage = my_age/2 + 7
    return girlsage

    for age_list in range(15,61):
    print ('for',age_list, 'is', n , 'is dateable' )

  38. Anuj Lal Shrestha Avatar

    def function(age):
    g =age/2 + 7
    return g

    for x in range(20,50):
    limit = function(x)
    print('if the guy's age is ',x,'he is allowed to date a girl aged' ,limit)

  39. dasi bablu Avatar

    def dating_age(x):
    return girls_age

    for x in range(15,61):
    print('my age is', x , 'my girl friend's age is' , my_dating_age )

  40. Abdullah Aslam Avatar

    def dating(my_age):
    age= my_age / 2 +7
    return age

    for my_age in range(15,45):
    print( my_age, '=' , rr)

  41. Daniel Chong Avatar

    def Allowed_Dating_Age(My_Age):
    Female_Age= My_Age/2 +7
    return Female_Age

    for n in range (15,61):

  42. Goutam Kumar Avatar

    My limit is 7 as i am yet to born

  43. TheRangeControl Avatar

    I'm confused, as "my_age" does not have any numerical value assigned to it. So, what is it comparing based on?

  44. Ian V Deventer Avatar

    According to the a 2 year old can date a 8 year old. Math is gross

  45. Ian V Deventer Avatar

    According to the a 2 year old can date a 8 year old X;

  46. Hexx i.m Avatar

    I'm 20. i can date 17 year olds 😀

    sirens blaring in backgroudn

Leave a Reply

Your email address will not be published. Required fields are marked *