So im trying to make a small game, but when i try to add one more to the loop, it dosent continue the loop. Is there any other way I could do this?
import random
chosenCard = 2
correctCard = 2
remove = random.randint(1, 3)
print(remove)
loop = 1
for i in range(loop):
if remove == correctCard or remove == chosenCard:
loop += 1
print("remove == correctCard or remove == chosenCard --- Adding loop +1", loop)
print("Chosen", chosenCard)
print("Correct", correctCard)
print("remove", remove)
whileinstead of aloop?rangeis evaluated it returns a range object from0toloopat the moment of evaluation. Changing the value ofloopafterwards doesn't affect therangeobject... You might be better using awhileloop instead...