# summing up all numbers from 0 to N, using a while loop # this example intentionally uses wrong indentation at the last line, # to illustrate the difference that it makes, compared to the correct # indentation at file summing_to_N_while_loop.py # get N from the user N_string = input("please enter N: ") N = int(N_string) # compute the sum total = 0 i = 0 while i <= N: total = total + i i = i+1 # print the result print("total =", total)