Problem 2.3 from SCHAUM’S OUTLINE OF Principles of COMPUTER SCIENCE

Count the primitive operations in your algorithm to find the mean. What is the order of growth of your mean algorithm? setup 4 loop 5 * length (length = n, the count of numbers to be averaged) return 2 Order of growth : Θ( n ) related source : SCHAUM’S OUTLINE OF Principles of COMPUTER …

Write pseudo code for finding the mean of a set of numbers.

mean( list_of_numbers ) length <– length of list_of_numbers index <– 1 sum <– 0 while index <= length { sum <– sum + list_of_numbers[index] index <– index + 1 } return sum / length example input : mean ( 1 2 3 4 ) length <– 4 index <– 1 sum <– 0 list_of_numbers[1] = …

Inter-School Sports Meet . Long Jump

Dhanu has the longest jump of 3 metres 40 cm. Gurjeet is second. His jump is 20 cm less than Dhanu’s. Gopi comes third.His jump is only 5 cm less than Gurjeet’s jump. How long are Gurjeet’s and Gopi’s jumps ? [toggle title=”Gurjeet: Answer” float=”left” width=”100px” margin=”0 20px 20px 0″ status=”closed”] 3 metres 20 cm[/toggle] …

2. Inter-School sports meet . Race

Have you heard about marathon races in which people have to run about 40 kilometres ? People run marathon on roads because the track of the stadium is only 400 metres. 10 rounds of a stadium track = —– km [toggle title=”Answer” float=”left” width=”100px” margin=”0 20px 20px 0″ status=”closed”] 4 km[/toggle] So,if you run a …

Inter-School Sports Meet . Race

Have you heard about 1500m or 3000 m race ? (1000 metres make 1 kilometre and 500 metres make half a kilometre) So you can say — In a 1500 metres race people run —– km [toggle title=”Answer” float=”left” width=”100px” margin=”0 20px 20px 0″ status=”closed”] 1.5 km[/toggle] In a 3000 metres race people run —– …