Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program should look like this: Please, show how to solve the following in Python (make it work correctly by correcting the mistakes) and explain
The program should look like this:
Please, show how to solve the following in Python (make it work correctly by correcting the mistakes) and explain what was wrong (using comments inside the program file):
'The program should ask user for positive integers and print them out. If user types zero or a negative number, the program should finish.'
Type a positive integer: 2 Your number: 2 Type a positive integer: 3 Your number: 3 Type a positive integer: 1 Your number: 1 Type a positive integer: 0 ***FINISHED*** while x>0: x=int(input('Type a positive integer: ')) print('Your number: ',x) print('***FINISHED***')Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started