Program ask user for input (how many fish he caught per day - 10 days) and than it needs to output average per day and output number from list that is higher than average
This is what i've done and it works but at catch above average i need to print which number from list is higher than average not how many...
1 2 3 4 5 6 7 8 9 10 11 12 |
list = [] above_average = 0 i = 1 while i < 11 : fish = int ( input ( "Catched fish today: " )) list .append(fish) i + = 1 average = sum ( list ) / len ( list ) if fish > average: above_average + = 1 print ( "Average per day: " + str (average)) print ( "Catch above average " + str (above_average)) |