Question: trying to write a python code for a tip calculator based on service and I'm running into an issue with my while loop.

```
service = ""
while service != "excellent" or service != "good" or service != "bad":
    service = input("(Please choose excellent, good, or bad): ")

```

This part is causing an infinite loop, but I'm not sure why or how to fix it...

Answer: 
You are using `or` where you want to use `and`.

The loop is going to continue if any one of the three conditions is true.

If your input is `"excellent"` then `service != "good"` and `service != "bad"` are both going to be true so the loop will continue. The same is true for the other values.

What you want is:

```
service = ""
while service != "excellent" and service != "good" and service != "bad":
    service = input("(Please choose excellent, good, or bad): ")

```

---

Even better (and more Pythonic as various commenters have pointed out) is:

```
service = ""
while service.lower() not in ["excellent", "good", "bad"]:
    service = input("(Please choose excellent, good, or bad): ")

```

This reads easier and also accepts inputs in any case (upper, lower, mixed).
To loop *until* any of a number of conditions is met (because it is neither possible nor meaningful to meet all of them at once), you need to loop *while* all of them are not met (logical negation). The most readable and pythonic way to express this that I can think of is:

```
service = ''
while service not in ('excellent', 'good', 'bad'):
    service = input("(Please choose excellent, good, or bad): ")

```