ITPEC FE Subject B April 2025 Question 5

Source exam: ITPEC FE Subject B April 2025Topic: Math & Numbers

ITPEC FE Subject B April 2025 — Question 5 of 20

Expressing math formulas with pow() — translate (√x + √y)² into nested pow() calls.

The formula breaks down as:
- √x = pow(x, 0.5) (square root is the same as raising to 0.5)

- √y = pow(y, 0.5)

- (...)² = pow(..., 2)

Combined: pow(pow(x, 0.5) + pow(y, 0.5), 2)

Verification with calc(4, 9): pow(pow(4,0.5) + pow(9,0.5), 2) = pow(2 + 3, 2) = pow(5, 2) = 25 ✓

Why not others:
- (b) Squares each root separately then adds: pow(2,2) + pow(3,2) = 4 + 9 = 13 ≠ 25

- (c) Takes the square root of the sum of squares: pow(16 + 81, 0.5) ≈ 9.85 ≠ 25

- (d) Returns √x + √y without squaring: 2 + 3 = 5 ≠ 25

- (e) Divides √x + √y by √2: (2 + 3) / 1.414 ≈ 3.54 ≠ 25

- (f) Divides x² + y² by √2: (16 + 81) / 1.414 ≈ 68.6 ≠ 25

Key rule: pow(a, 0.5) = √a and pow(a, 2) = a². Nest them to match the original formula structure.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.