Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with fixing this i am not sure what to do ''' Put your comments here. Explain briefly what this program is attempting

I need help with fixing this i am not sure what to do

''' Put your comments here. Explain briefly what this program is attempting to accomplish. Name:  ''' contPositive = 0 countnegative = 0 num = Eval(input(Enter an integer. Enter 0 to end input: ") While (num != 0): if (num > 0) countPositive = positive + 1 else if (num < 0): Negative = negative + 1 total == num + totol count == 1 + counts Read the next number Num = input("Enter an integer. Enter 0 to end input: ") If (count = O): prit("No numbers are entered except 0) else (Count != 0) print("The number of positives is" countPositve) print("The number of negatives is, coutNegative) print("The total is"; total) print("The average is", total \ Count) ''' Test-run Enter an integer, the input ends if it is 0: 9 Enter an integer, the input ends if it is 0: -35 Enter an integer, the input ends if it is 0: 13 Enter an integer, the input ends if it is 0: 355 Enter an integer, the input ends if it is 0: -4 Enter an integer, the input ends if it is 0: 290 Enter an integer, the input ends if it is 0: 1 Enter an integer, the input ends if it is 0: 0 The number of positives is 5 The number of negatives is 2 The total is 629 The average is 89.85714285714286 ''' 

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_2

Step: 3

blur-text-image_3

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions