What I want to do is to save a variable when I run the code again
Code:
a = 1
b = input("c or d")
if b == "c":
a += 1
print(f"you have {a} points")
if b == "d":
a -= 1
print(f"you have {a} points")
Still confused? The first time I run this, if I respond with "c", then the output should be "you have 2 points", the next time I run this and respond with "c", the output should be "you have 3 points". I tried to find tutorials but none of them were useful. Share the code here if you solve the issue
IMPORTANT:
- I use PyCharm
- Add the code along with your answer