Bucky's Challenge ~ Dating Age

+1 Paul Fabing · July 31, 2015

def age_test():

# returns list of Dudes and their appropriate dating age

dudes = ("Jack", "Morg", "Jim", "John", "Tully", "Jose", "Stoli")

dudes_age = (25, 22, 18, 41, 19, 31, 39)

dudes_aa = []

x = 0

aa = 1

print("Name\tAge\t\tGirl's Age")

for a in dudes_age:

aa = a / 2 + 7

dudes_aa.append(aa)

for i in dudes:

print(i, "\t", dudes_age[x], "\t", dudes_aa[x])

x += 1

return

age_test()

Post a Reply

Replies

Oldest  Newest  Rating
0 Eric Sysak · August 3, 2015
def allowed_dating_age(his_age):
her_age = (his_age / 2) + 7
return her_age

print("Man's age Woman's age")
for his_age in range(15, 61):
womans_age=allowed_dating_age(his_age)
print(" ", his_age," ", womans_age)

0 Rajasekhar Vajrala · November 2, 2015
def alloweddateage(dude_age):
    girl_age = dude_age/2 + 7
    return girl_age

for i in range(15,61):
    print("For a dude at age=",i,"his girl should be",alloweddateage(i),"or older")
    
  • 1

Python

107,107 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator