[Tutor] print label error
Pravya Reddy
pravyareddy at gmail.com
Tue Mar 5 01:28:58 CET 2013
Hi
I am having a builtin intendation error for print Addem(3,2).Does it vary
for different versions of python?
How to clear the error?
def Addem(this, that):
return this + that
print Addem(3, 2)
print Addem("book", "worm")
print Addem(3.2, 1)
try:
print Addem("caution",1)
except TypeError:
print('typeerror raised for Addem("caution", 1))
try:
print Addem(14)
except TypeError:
print('typeerror raised for Addem(14)')
print Addem
print("Addems done.")
def PrintSum(this, that):
print(this + that)
print(printsum('high', 'heel')
def DoSomething(data):
for index,datum in enumerate(data):
print(datum,)
if index % 3 == 2:
print
print
a_string = "earthshine"
a_list = [1,2,3,4,5,6,7]
DoSomething(a_string)
DoSomething(a_list)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130304/ba6b01d1/attachment-0001.html>
More information about the Tutor
mailing list