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).
In this situation you want to use "and" rather than "or". Another option, though, that is cleaner would be to do this:

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

```

This will test whether the value of `service` is in the list of acceptable answers and makes it easier to edit later.