Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

challenge activity 2.9.3: writing math calculations. jump to level 1 co…

Question

challenge activity
2.9.3: writing math calculations.
jump to level 1
compute: $d = b^{|c|}$
click here for example
1 import math
2
3 b = float(input())
4 c = float(input())
5
6 \\\ your code goes here \\\
7
8 print(f\{d:.2f}\) # outputs d with 2 decimal places

Explanation:

Step1: Import math module

import math

Step2: Get input for b

b = float(input())

Step3: Get input for c

c = float(input())

Step4: Calculate d = b^|c|

d = b ** abs(c)

Step5: Print d with 2 decimals

print(f"{d:.2f}")

Answer:

import math
b = float(input())
c = float(input())
d = b ** abs(c)
print(f"{d:.2f}")