Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a while loop that adds the variable number to the variable sum _ of _ numbers. Then it should prompt the user with text

Write a while loop that adds the variable number to the variable sum_of_numbers. Then it should prompt the user with text
# to enter another whole number (int) and add it to sum_of_numbers. The loop should iterate as long as the user enters an even whole number. The whole number can be positive or negative.
# Print sum_of_numbers AFTER EXITING the while loop
sum_of_numbers =0
number = int(input('Enter a whole number: '))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions