REVISION AND PRACTICE

Week 3 revision and practice

3 min read
On this page 1 headings

Try each question before revealing its explained answer. Use the explorer to test a procedure on the original course data.

REAL COURSE DATA · FOLLOW THE PROCEDURE

Find Mathematics marks below the final average

Read the current record, check the explanation, and watch the variables. Use Back to revisit any step.

Ready

CURRENT RECORD

Ready to begin

No records have been processed. Start with Next step.

What we remember

Processed
0

Start at the first step. Watch the current row and the values we remember.

Mixed practice

Try it yourself

Is a column one student or one attribute?

Show explained answer

One attribute, such as Mathematics. A row describes one student.

Try it yourself

Which field tells you the length of considered?

Show explained answer

LetterCount, which is 10. SerialNumber 12 is its position identifier.

Try it yourself

What does adding ₹567 on every item row produce?

Show explained answer

₹3,969, which wrongly counts the same bill seven times.

Try it yourself

Does a Mathematics mark of 72 pass the below-average test here?

Show explained answer

Yes. 72 < 2171/30.

Try it yourself

How many of 50,50,50,100 lie below their mean?

Show explained answer

Three. Their mean is 62.5.

Try it yourself

Why can the first mark update both min and max?

Show explained answer

Before seeing any marks, both limits are placeholders. The first real mark is both the smallest and largest seen so far.

Try it yourself

Is Monday short under this definition?

Show explained answer

No. Six letters makes it long; it is the frequent-long counterexample.

Try it yourself

Does 8/9 prove that short words cause repetition?

Show explained answer

No. It describes an association in this dataset, not a causal rule.

Try it yourself

Who has the highest actual total?

Show explained answer

Rahul, CardNo 11, with 281.

Try it yourself

Current values are 90,80,70. What happens when 95 arrives?

Show explained answer

Third becomes 80, Second 90, First 95. Save lower slots first.

Try it yourself

What is the third distinct Mathematics level here?

Show explained answer

89. The third student score counting ties is 93.

Try it yourself

What does return Sum do?

Show explained answer

It sends the computed Sum back to the code that called the procedure.

Try it yourself

What is the sum of subject maxima?

Show explained answer

97+92+97=286.

Try it yourself

Why store each procedure result in a separate variable?

Show explained answer

Later calls return new answers. Saved variables keep all four values available for the final comparison.

Try it yourself

What happens if you move SecondTotal but forget SecondID?

Show explained answer

The score can become attached to the wrong person.

Try it yourself

Can four first-place ties all fit three prizes?

Show explained answer

No. The rules need a tie policy or permission to award more than three prizes.

Try it yourself

Do the actual winners satisfy the lecture’s representation rule?

Show explained answer

Yes. Rahul is M; Deepika and Abirami are F.

Try it yourself

Does renaming a reversed pile restore sequence?

Show explained answer

No. It returns the cards but preserves the reversed sequence.

Try it yourself

What is the difference between interface and implementation?

Show explained answer

The interface is the agreement the caller relies on. The implementation is the internal method used to meet it.

Try it yourself

Must every procedure return a useful number?

Show explained answer

No. Some procedures act by updating or rearranging data.

Try it yourself

How many bills exceed the final average?

Show explained answer

8 bills.

Try it yourself

What are the final Big Bazaar sum and count?

Show explained answer

₹13,284 and 6 bills.

Try it yourself

Must a nonmatching bill reset the counters to zero?

Show explained answer

No. It should return the existing values unchanged.

Try it yourself

A sum procedure returns the correct answer but reverses a text table. Is that necessarily safe?

Show explained answer

No. A caller may require preserved order. Correct results do not excuse a contract-breaking side effect.

Try it yourself

For distinct top levels 90,80,70 and new 85, what are the new levels?

Show explained answer

90,85,80. Move old Second 80 into Third before writing Second 85.

Try it yourself

Can a common subject topper be inferred solely from the sum 286?

Show explained answer

No. Compare the maximum actual total with 286. Here 281 differs, so there is no common topper.

Try it yourself

How many visits does the below-average algorithm make on 30 rows?

Show explained answer

60 record visits:30 for the sum/count scan and 30 for the filter scan. Phase-boundary steps are not extra record visits.

YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑