Sorry guys but I'm confused about how to solve this...

Program **takes a series of separate and random int inputs, compares each new int to the previous** (higher, lower, equal): e.g, first number = 10, next number = 5, output = lower. This loops until user enters [0]

But I now want to change it so that **all the outputs are at the end instead of 1 after each pair**. Let's say overall input is 2, 3, 6, 6, 5, 1 [0]: print statement should be only after [0] which would say, e.g., higher higher equal lower lower (all in one statement).

*Things I've tried... print(a) but of course (a) gets reassigned to each new number..... tried (rookie mistake): if b < a: b = "higher" but '<' not supported between instances of 'str' and 'int'...... tried a list but error: expected list but received int...... another error (can't remember what I tried): int object is not iterable. (Also, I know I should probably have some elifs instead of all these ifs but that's not causing problems...)*

My code:

```
z = 0
done = False
a = int(input("Enter first number: "))
while not done:
    b = int(input("Enter next number [0 = done]: "))
    if b != z: #while program not done
        if b > a:
            print("higher")
        if b == a:
            print("equal")
        if b < a:
            print("lower")
        a = b #second number becomes first and repeat
    else:
        done = True

```

Any help is greatly appreciated. Thank you.