Lessons 33–34 · 2 lessons · B. Boltayev, A. Azamatov, A. Asqarov, M. Sodiqov, G. Azamatova. Fundamentals of Informatics and Computer Technology, Grade 8. Second edition. “O‘zbekiston milliy ensiklopediyasi” State Scientific Publishing House, Tashkent, 2015
33
Review tasks (1)
Textbook: pp. 134–136
GoalTurns mathematical expressions into sheet formulas and solves tasks combining conditional formulas and text functions.
New words
SQRT(x): the square root of x · SQRTREPLACE(text; start; count; new): swaps a piece of the text for new text · REPLACEMAX(range1; range2; ...): the largest of all the numbers in the ranges · MAXrounding: ROUND(x; n) rounds a number to n decimal places · yaxlitlash
Explanation
When turning a mathematical expression into a formula, write * for multiplication, use ^ for powers, SQRT for the square root and a cell address in place of x: the expression 5x² + 3√x – 4 becomes =5*A1^2+3*SQRT(A1)-4. Testing divisibility: =IF(MOD(A3; 4)=0; "divisible"; "not divisible"). The largest number in several blocks: =MAX(B2:B6; E2:E4). In text, REPLACE("computer"; 4; 3; "XYZ") replaces 3 characters from the 4th and gives "comXYZer". To check whether an equality is an identity, for example (x+3)^2 = x^2+6x+9, we calculate both sides for several values and compare them with IF; with decimals apply ROUND before comparing, because the computer stores fractions approximately. Compound interest: an amount B at M per cent a year after A years is =B*(1+M/100)^A. After writing a formula, test it with edge values.
Worked examples
At x = 4, =5*A1^2+3*SQRT(A1)-4: 5 · 16 = 80; 3 · 2 = 6; 80 + 6 – 4 = 82. For 92 : 4, MOD(92; 4) = 0, so “divisible”.
Identity: at x = 2, (2+3)^2 = 25 and 2^2+6·2+9 = 4+12+9 = 25 – equal. At x = 0, 9 and 9. One equal value does not prove an identity, so many values are tried.
Class activity
“Formula translators”: groups write a mathematical expression in a notebook, another group turns it into a sheet formula; then they compare values by hand and in the sheet.
Practice
1
What is =5*A1^2+3*SQRT(A1)-4 when x = 4?
82
2
What does REPLACE("computer"; 4; 3; "XYZ") give?
comXYZer
3
At x = 3, what is (x+3)^2 and what is x^2+6x+9? Does the identity hold?
36
4
Why is ROUND applied before comparing decimal numbers with IF?
The computer stores decimals approximately, so numbers that should be equal may differ slightly.