I have a problem with python, I'm begginner in python. How clear the screen of 
GUI python interactive???? and which is the difference between interactive mode 
and not interactive mode???? because when I run a program in interactive mode, 
the program run very good, but if run in not interactive mode not show me 
error, but the return of function returns no value, this is the source code:
 
def suma(no1,no2):    total=no1+no2    return total
print 'hola'opcion=input()if opcion==1:    print 'suma'    a=input()    
b=input()    suma(a,b)
 
the result of this code is:
 
hola1suma57>>> totalTraceback (most recent call last):  File "<pyshell#0>", 
line 1, in <module>    totalNameError: name 'total' is not defined>>> 
 
why this happens??? what I did wrong??? and why run very good in interactive 
mode??? thanks for help me and sorry for my bad english, I from Mexico and I 
english student. Thank you.
_________________________________________________________________
Juega y gana, tenemos 3 Xbox a la semana.
http://club.prodigymsn.com/ 
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to