Python code won't run?
Question: Hello i was wondering why this code will not run,thanks.

    
    
    count = 0
    finished = False
    total = 0
    while not finished:
        number = int(input("Enter a number(0 to finish)"))
        if number == 0:
            finished = True
            else:
                total = total + number
                count = count + 1
    print("the average is", total/ count)
    count = 0
    


Answer: It does run, the only issue I can see is that your else is indented inside
your if block. In Python, indentation is important in a way that curled
brackets or keywords are important in other programming languages.

    
    
    count = 0
    finished = False
    total = 0
    while not finished:
        number = int(input("Enter a number(0 to finish)"))
        if number == 0:
            finished = True
        else:
            total = total + number
            count = count + 1
    print("the average is", total/ count)
    count = 0
    

