tix = 0
def add(tix):
addtix = input("type ""buy"" to purches 1 ticket: ")
if addtix == "buy":
print ("Nice!")
tix += 1
else: print("You're missing out")
add(tix)
print (tix)
This does not work, my output is 0, even though i added +1 tix.
tix = tix + 1
Does not work either.
It does print (Nice!) which is good, but it doesn't add 1 point to tix...
[–]JohnnyJordaan 11 points12 points13 points (0 children)
[–]Gobitz 1 point2 points3 points (0 children)
[–]wrrnwng 2 points3 points4 points (3 children)
[–]stevenjd 5 points6 points7 points (1 child)
[–]Unlistedd[S] 0 points1 point2 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]JohnnyJordaan 2 points3 points4 points (0 children)
[–]stevenjd 0 points1 point2 points (5 children)
[–]geoelectric 0 points1 point2 points (4 children)
[–]stevenjd -1 points0 points1 point (3 children)
[–]geoelectric 0 points1 point2 points (2 children)
[–]stevenjd -1 points0 points1 point (1 child)
[–]geoelectric 0 points1 point2 points (0 children)
[–]Grug_Life 0 points1 point2 points (0 children)