[ create a new paste ] login | about

Link: http://codepad.org/yQXHzIbE    [ raw code | output | fork ]

alok24 - Python, pasted on Jun 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def list_benefits():
    s1 = "More organized code"
    s2 = "More readable code"
    s3 = "Easier code reuse"
    s4 = "Allowing programmers to share and connect code together"
    return s1,s2,s3,s4

def build_sentence():
    obj=list_benefits()
    print obj[0] + " is a benefit of functions!"
    print obj[1] + " is a benefit of functions!"
    print obj[2] + " is a benefit of functions!"
    print obj[3] + " is a benefit of functions!"

print build_sentence()


Output:
1
2
3
4
5
More organized code is a benefit of functions!
More readable code is a benefit of functions!
Easier code reuse is a benefit of functions!
Allowing programmers to share and connect code together is a benefit of functions!
None


Create a new paste based on this one


Comments: