# is there any type of variable that calculates how many negative numbers are there in your code?

Variables are assigned by yourself so I dont know what you mean by the question?

answered by (1 point)

It's the same form like you used to calculate the number of positive numbers. It's just confusing because it's negatives.

answered by (1 point)
+1

Yeah could you please tell me how we can do it ? i dont know how to do it the postive ones haha

0

So mine is in this form:
negative sum='''
negativeCount = '''
loop
negative sum= '''
negativecount=negative count+1

print(negative sum)

0

thank you!

I think that we will learn about the count() function later in the course.

However, another solution to your question.
You can create another variable that can display the sum of times the negative (or positive) number appears. It also needs an if/elif function to work. If the number is positive, the variable that you have created will add 1 to itself.

For example:

positiveCount = 0
if ... :
positiveCount = positiveCount + 1
answered by (1 point)
+1

Thank you!

yeah like i already put the for loop and the if statement, i just need to print how many numbers are there and plus it in the print statement

answered by (1 point)