Spam()


#1

def spam():
"""prints Eggs to the console???"""
print "Eggs!"

Define the spam function above this line.

spam()

in the above code why do we write spam() on the last line??????


#2

Indent your code properly..

for example..

def somefunction():
    """This is my function"""
    print something

Notice : I have indented the comment too.


#3

what does %d mean??????


#4

have your current problem resolved?


#5

yes thank you i have understood


#6

%d is used for string formatting.
It denotes decimal (base 10) integer (mentioned in post[link]).


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.