0

(1+_) **2 =16

give me answer please

22nd Sep 2016, 3:57 PM
mayank bairagi
mayank bairagi - avatar
6 Answers
+ 4
sure, you all got the right answer, but that isn't the point of learning how to program, you're not correct until the computer knows the answer is 3 (we learn to solve programmatically, not mathematically.) so let's start with what we know: we have 2 variables, a root and some number x we want to find. the math module has a function for solving square roots, otherwise we would need to write our own functions for cubed roots, etc. but that isn't the point to answer here. from math import sqrt as s <--- Import sqrt function as s def solveForX(a, b): <---- solving for x with two variables x = ? <---- what we want to find we want our function to return the solved value of x: from math import sqrt as s def solveForX(a, b): x = return x <----- now we need to determine how x is solved: x = sqrt16 - 1 or x = rootb - a from math import sqrt as s def solveForX(a, b): x = s(b) - a <----- return x then, we want to print the result: from math import sqrt as s def solveForX(a, b): x = s(b) - a return x print(solveForX(1, 16)) <----- a=1, b=16 and now your computer knows the answer is 3.0 (x is returned as a float), and you can solve for other values that follow the same outline (rather than just the one you know now)
22nd Sep 2016, 8:18 PM
vyavas
+ 1
3
22nd Sep 2016, 4:06 PM
Nikhil Srivastava
+ 1
1+3=4 4**2=4×4
22nd Sep 2016, 4:06 PM
Nikhil Srivastava
0
=16
22nd Sep 2016, 4:07 PM
Nikhil Srivastava
0
-5, too
26th Sep 2016, 12:52 AM
Agung Sukma
Agung Sukma - avatar
0
1+3=4*4=16
1st Oct 2016, 3:03 AM
Adarsh giri
Adarsh giri - avatar