Friday, July 11, 2014

Day 97

Python at CodeCademy. Worked on Python tutorial 4 of 19, Functions, Parameters and Arguments! Worked on Parameters and Arguments.

The code used:
def power(base, exponent):
    result = base**exponent
    print "%d to the power of %d is %d." % (base, exponent, result)

power(37, 4)  

The interaction for this code looked like this:
37 to the power of 4 is 1874161.

No comments:

Post a Comment