Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE A FLOWCHART FOR THIS PYTHON PROGRAM #initial variables total = 0 countPositive = 0 countNegative = 0 #ask user how many sets of numbers

CREATE A FLOWCHART FOR THIS PYTHON PROGRAM

#initial variables

total = 0

countPositive = 0

countNegative = 0

#ask user how many sets of numbers to input

num1 = int(input("How many set of numbers would you like to enter: "))

#loop for taking input

for x in range(1, num1+1):

num2 = int(input(f"{x}. Enter number: "))

#calculating total

total += num2

#check if number is positive or negative

if (num2 >= 0):

countPositive += 1

elif(num2 <= 0):

countNegative += 1

average = total / num1

#print result

print()

print("The number of positives is ", countPositive)

print("The number of negatives is ", countNegative)

print("The total is ", total)

print("The average is ", round(average,2))

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

=+informational reports, analytical reports, and proposals

Answered: 1 week ago

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What are the classifications of Bank?

Answered: 1 week ago