Mathematical Operations in Javascript and Python - Hacks
Apply your skills of math, logic, and coding.
Basic Algebraic Math hacks
Q1 (Exponents):
A cube has a side length of 4 units. What is its volume?
64
Q2 (PEMDAS):
Evaluate the expression:
(12+8)/2+(3^2)
19
Q3 (Algorithm):
Write Python code where you define variables and run commands that find the values of operations you apply onto them
# Define variables
a = 12
b = 8
c = 2
d = 3
# Apply operations
result = (a + b) / c + (d ** 2)
print("The result is:", result)
The result is: 19.0