[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

Python Programming Tutorial – 13 – Return Values
by
Tags:
Comments
48 responses to “Python Programming Tutorial – 13 – Return Values”
-
def my_age(age):
girl_age = age //2 + 5
return(girl_age)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 🙂
-
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") -
4:31 "I don't have any friends at all" – When life hits you hard
-
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)
print(Ans) -
ok … my limit is 26.5 or older
hahahaha i had never dated any females nor males ofcourse -
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. -
you are cool 😀
-
for x in range(18,50):
allowed_age=allowed_dating_age(x)
print x,"can date age",allowed_age,"or older" -
No one can beat the Bucky's commentary
-
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") -
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_ageprint('You are allowed to date girls', her_age_function(), 'years old or older')
-
i can be your friend bucky
-
an awesome equation 😀 😀
-
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):
ages.append(f)#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)) -
when i was 16 i liked 16 year old girls. when i got older that never changed so now i still do.
-
So a 23 year old like myself can date an 18 year old? That's social suicide!
-
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.
-
Like seriously, I'm a 400 year old vampire, you know how hard it is to find a date on plenty of fish?
-
def allowed_dating_age(guys_age):
girls_age = guys_age/2 + 7
return girls_agefor guys_age in range(15,61):
print("a", guys_age, "year old", "may date a girl as young as", allowed_dating_age(guys_age)) -
def list_dating_age(age):
girls_age = age / 2 + 7
return girls_agefor age in range(15, 50):
list_dating_age(age)
limit = int(list_dating_age(age))
print('The limit for {} is {}.'.format(age, limit)) -
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. -
How to take input from the user bucky!!!! I couldn't find it anywhere in your 56 Tuts 🙁
-
def function():
for age in range(15,66):
limit = age/2+7
print(age, "is allowed to date", limit)function()
-
def zenith(all):
age=all/2+7
return age
for f in range(20,70):
print("a man with age ",f,"can date a girl whose age is",zenith(f),end='') -
I am pissed about this ad of udemy, everytime it pops up I can feel my ear bursting
-
what a creep
-
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..! -
no python, no Chicks.
Greetings from Greece -
u haven't defined some of those variables waaaaaaaa
-
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
-
return means store its value from the function and use it later
-
made this with a list like u said 🙂
def allowed_dating_age(age):
return age/2 + 7ages = []
for i in range(60,71):
ages.append(i)for i in range(0,len(ages)):
print("age:", ages[i], "can date", allowed_dating_age(ages[i]), "or older") -
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.
-
Negative creeps will never know his contribution is saving millions students life every year.
-
I can date 14.5 years old Girl
-
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') -
def allowd_deting_age():
for my_age in range(15,60):
girls_age=my_age/2+7
print(my_age,girls_age)allowd_deting_age()
-
def allowed_age(x):
girls_age = x/2 +7
return girls_agefor x in range(15,61):
limit = allowed_age(x)
print('if your age is', x, 'you can date', limit, 'or older') -
def age_aloowed(my_age):
girlsage = my_age/2 + 7
return girlsagefor age_list in range(15,61):
n=age_aloowed(age_list)
print ('for',age_list, 'is', n , 'is dateable' ) -
def function(age):
g =age/2 + 7
return gfor 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) -
def dating_age(x):
girls_age=(x/2)+7
return girls_agefor x in range(15,61):
dating_age(x)
my_dating_age=dating_age(x)
print('my age is', x , 'my girl friend's age is' , my_dating_age ) -
Homework!
def dating(my_age):
age= my_age / 2 +7
return agefor my_age in range(15,45):
rr=dating(my_age)
print( my_age, '=' , rr) -
def Allowed_Dating_Age(My_Age):
Female_Age= My_Age/2 +7
return Female_Agefor n in range (15,61):
Allowed_Dating_Age(n)
print(n,Allowed_Dating_Age(n)) -
My limit is 7 as i am yet to born
-
I'm confused, as "my_age" does not have any numerical value assigned to it. So, what is it comparing based on?
-
According to the a 2 year old can date a 8 year old. Math is gross
-
According to the a 2 year old can date a 8 year old X;
-
I'm 20. i can date 17 year olds 😀
sirens blaring in backgroudn
Leave a Reply