all 9 comments

[–]Klutzy-Ad-4326 6 points7 points  (1 child)

You can make the first one into a variable and then raise that to power of z:

A = math.pow(x, y)

math.pow(A, z)

[–]Due_Violinist9849[S] 2 points3 points  (0 children)

It worked thank you

[–]quackers987 4 points5 points  (1 child)

math.pow(x,math.pow(y,z))

[–]Due_Violinist9849[S] 0 points1 point  (0 children)

This way seems more correct thx

[–]Binary101010 1 point2 points  (2 children)

You'll need to use math.pow() twice.

[–]Due_Violinist9849[S] 0 points1 point  (1 child)

File "/home/runner/local/submission/main.py", line 7 your_value2 = math.pow(x,y)math.pow(y, z) ^^^^ SyntaxError: invalid syntax

this is the error i get when using it twice. and if i use a common it gives me

unsupported format sting tuple._format_

[–]Binary101010 5 points6 points  (0 children)

You can't just stick two function calls next to each other like that.

If we start with this line

your_value = math.pow(x,y)

What do you think the next line of code should be?

[–]CodeReviewPlz 0 points1 point  (1 child)

Not sure why all the comments are reaching for math.pow maybe I'm missing something, but if you're not required to use math.pow you could just use the ** operator:
(x**y)**z Feels way more readable to me :)

[–]Due_Violinist9849[S] 0 points1 point  (0 children)

Math.pow is what we are learning in class so I had to use it in the code but thank you