total = 0 num = int(input("Enter the number: ")) while num != 7: total = total+num num = int(input("Enter the number: ")) print("Sum: ", total)