0
What's wrong in this code ? Plzz can anyone correct it for me ?
7 Respuestas
+ 4
there are many errors in this code:
1.u compared int with string which always return False so only else part is always execute
2.if u wanna used 'amount' in ur function , u have to globally accessed before using in print statement like this
def funcname():
global amount
print(amount)
+ 2
Remove the quotes in lines 21 and 23. You have converted the values to integers at input time.
+ 2
As Paul Jacobs said u have to remove quotes and In. function u have to globally referenced the 'amount' variable, that's it.
+ 2
Add the second line to both functions:
def keti():
global amount
if payf=="y":
........
def keti2():
global amount
if payf=="y":
+ 1
thanks Paul and Shruti...it worked !
0
will u plz write the code for me ?
0
done....but it is still not working!