CBSE Class 11 Informatics Practices Question 54 of 102

Python Programming Fundamentals — Question 15

Back to all questions
15
Question

Question 10

Write Python expressions equivalent to the following arithmetic/algebraic expressions:

(a) a+b2\dfrac{a + b}{2}

(b) 32+932\dfrac{3^2 + 9^3}{2}

(c) 32+9353^2 + \dfrac{9^3}{5}

(d) a+a+2b\sqrt{a} + \dfrac{a + 2}{b}

(e) 86+6sum7var8 - 6 + \dfrac{6 * \text{sum}}{7} - \sqrt{\text{var}}

(f) ut+12at2ut + \dfrac{1}{2} at^2 (u, a, t are variables)

Answer

(a) (a + b) / 2

(b) (3**2 + 9**3) / 2

(c) 3**2 + 9**3 / 5

(d) a**0.5 + (a + 2) / b

(e) 8 - 6 + 6 * sum / 7 - var**0.5

(f) u * t + 1 / 2 * a * t**2