+ 2
How to define factorial and square root by my own without any library & module?
4 odpowiedzi
+ 1
+ 4
No one who keeps you from doing this. the function needs 2 lines of code and the call 1 line. so it’s 3 lines in total. you should be able to do this by yourself.
+ 3
Square root can be calculated by the formula: n to the power of 0.5. so if you want to get the square root of 49 you can use this expression:
print(49 ** 0.5)
# output is 7.
+ 2
I want to define a function not to just get that value.