Why the mathmatic root doesnt work with me in the end of this code (python)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why the mathmatic root doesnt work with me in the end of this code (python)?

x=float(input()) y=float (input() ) print ("The multiplication of the two numbers is" ,x*y) print ("The quotient is",x/y) print ("albaqe men al qesma",x%y) print("the summation is",x+y) print("The result of the subtraction is",x-y ) print("the first number to the power of the second is", x**y) print ("the first number to the root of the second is" ,x//y)

16th Nov 2022, 11:23 AM
ابو عبد الله
5 Answers
0
y-th root of x: x**(1/y)
16th Nov 2022, 5:27 PM
Mozzy
Mozzy - avatar
+ 2
Be smart 😉: Square root (math.sqrt): x**(1/2) or x**0.5
16th Nov 2022, 1:18 PM
Solo
Solo - avatar
+ 1
The operator in the last expression is an integer divisor. If x < y then x//y = 0
16th Nov 2022, 11:33 AM
Solo
Solo - avatar
0
How can i do a root to a number
16th Nov 2022, 12:10 PM
ابو عبد الله
0
Thanks for both of u
17th Nov 2022, 7:57 AM
ابو عبد الله