Posts

Showing posts with the label Write a python programm to reada 5 number and counts the number of positive number and print the average of all positive values.

Write a python programm to reada 5 number and counts the number of positive number and print the average of all positive values.

  #Write a python programm to reada 5 number and counts the #number of positive number and print the average  of all #positive values. i= 0 pos= 0 sum= 0 while i< 5 :     num=int(input( "Enter the number" ))     i+= 1     if num> 0 :         pos=pos+ 1             if num> 0 :         sum=sum+num         print( "Positiv number:" ,pos) print( "Average of positive number:" ,sum//pos)