Put one function inside another
Is sixty above a five-day average of fifty million riels?
- TQ2-C04-L03
- About 2 min
- Khmer voice · English terms
- Textbook pp 116–118
Lesson 3 · 3 of 35 in TQ2 Chapter 4
Practice card
Your turn
Sales are 40, 60, 80, 50, 20 KHRm. Change Tuesday’s 60 to 40. What is the 5-day average?
Decide your answer first, then check it.
Check yourself
3 exam-style questions
2 questions on this lesson and 1 review question from Lesson 1. Choose an answer, then check it to see why it is right or wrong.
- Question 1 of 3This lessonTextbook pp 116–118
- Question 2 of 3This lessonTextbook pp 116–118
- Question 3 of 3Review · Lesson 1Textbook pp 112–114
Your answers stay on this device. A question you miss goes on your review list and comes back in a later quiz.
Notes
Read first: TQ2 study text, printed pages 116–118.
Book §1.4, pp 116–118. The five daily sales are the book's; Tuesday at KHR 40 million is ours. The book labels the false result Lower, which includes equal values; we say At or below.
How this lesson uses the textbook: TQ2 Chapter 4 · English printed pp 116–118
Source: New term — nested function. Source §1.4, pp 116–118.
These lessons add to your formal studies; they don't replace them. Keep going to class, reading your textbook, doing the practice exercises and taking notes.
Read the English transcript
Is sixty above a five-day average of fifty million riels?
Higher, because sixty is greater than the five-day average of fifty million riels.
A fixed benchmark can become outdated after inputs change. The average function supplies a new benchmark from the intended range. IF then returns the message associated with the comparison. A function used inside another is a nested function, for example AVERAGE inside IF, or SUM inside ROUND.
Return to the book's five daily sales, forty, sixty, eighty, fifty and twenty million riels. Their average is fifty. Compare Tuesday's sixty with the average of B four through B eight. It is higher, so the message is Higher. Put the AVERAGE calculation inside IF, without its own equals sign, and close every bracket. The false message says At or below, which also covers a value exactly equal to fifty.
Watch out for pasting AVERAGE with its own equals sign. After the greater-than sign it makes greater than or equal to, so Thursday's fifty would say Higher.
Your turn. Keep the other values but change only Tuesday's sixty to forty million riels. What is the five-day average now?
Remember to understand each function before combining them.
The video already has Khmer subtitles. The Khmer transcript follows after our Khmer review.