Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you help me check the answer plz Translate question 1 to question 2 1) Writing an algorithm (20 marks] Complete the algorithm that outputs
Can you help me check the answer plz
Translate question 1 to question 2
1) Writing an algorithm (20 marks] Complete the algorithm that outputs the average value of all positive numbers found in a list. Assume that a positive number is a number greater than 0. For example: Given a list with the following contents: (8, -4, -1,7, 0, -3,4,-1, -6, -3, 6, 5, 11, -4, 0,5, 2] - The output should be 6, because (8+7+4+6+5+11+5+2)/8 = 6 Complete the algorithm given the following first steps: 1. Input items into list 2 index=0 3 Count-o 4. While index > count count+lisindex indexindex +1 count count 8 Output Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started