Friday, July 5, 2019

I'm having trouble with 'while' in python

Here is my code:



while c2 != 1 or 2:

c2 = input('<1.Enter the kitchen> <2.Exit the house> ')


I was trying to make a text-based rpg, but this part kept stuffing up! I wanted the console to keep asking for the input until the 'c2' variable was 1 or 2, but it kept looping! What am I doing wrong?

No comments:

Post a Comment

plot explanation - Why did Peaches&#39; mom hang on the tree? - Movies &amp; TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...