Posts

Showing posts with the label PYTHON program to read 5 numbers and counts the number of positive and negative number

write a program to read 5 numbers and counts the number of positive and negative number

  #6 write a program to read 5 numbers and counts the number #of positive and negative number     i= 0 pos= 0 neg= 0 while i< 5 :     num=int(input( "Enter the numbers:" ))     i+= 1     if num> 0 :         pos=pos+ 1             else :         neg=neg+ 1 print( " Total positive number is:" ,pos) print( "Total negative number is:" ,neg)