Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HELP PLEASE: Python program that uses a while loop to multiply integer factors entered by the user. The program should continue to accept integer factors

HELP PLEASE: Python program that uses a while loop to multiply integer factors entered by the user. The program should continue to accept integer factors until the user presses ENTER. The running product should be displayed after each input. See Sample Output.image text in transcribed

** total is not defined** and I can't seem to keep the running multiplication going. Also, I thought I had correctly assigned the end of the loop with the variable I chose and it works when pressing ENTER - but I am unsure that is what is being asked.

This is my code so far:

# Ask user for integer product = 1

# Use while loop while True: number = int(input('Enter an integer factor or ENTER to quit: ')) # If the user presses 'ENTER' , end loop if number Enter an integer factor or ENTER to quit 3 The running product is now 3 Enter an integer factor or ENTER to quit 5 The running product is now 15 Enter an integer factor or ENTER to quit 6 The running product is now 90 Enter an integer factor or ENTER to quit 8 The running product is now 720 Enter an integer factor or ENTER to quit Program ended

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

Logic In Databases International Workshop Lid 96 San Miniato Italy July 1 2 1996 Proceedings Lncs 1154

Authors: Dino Pedreschi ,Carlo Zaniolo

1st Edition

3540618147, 978-3540618140

More Books

Students also viewed these Databases questions