Python Add condition inside the loop, so the program adds only EVEN numbers.
theSum = 0count = 0while True:number = input("Enter a number or press Enter to quit: ")if number == "":breaktheSum += float(number)count += 1
print("The sum is", theSum)if count > 0:print("The average is", theSum / count)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here