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).
Right now, you're saying "if any three of these statements is true, continue the while loop". 

What you want is:

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

```