Ask the user to print two numbers ‘x’ and ‘y’ then print out the number ‘x’ raised to power ‘y’.

Here is the code:


#Ask the user to print two numbers ‘x’ and ‘y’ then print out the number ‘x’ raised to power ‘y’. 

x = 2
y = 3
print('X = ', x)
print('Y = ', y)
print(x**y)

# This code is contributed by Ahmad Shafiq

callout-flag

Love this read? Subscribe to Modernage!

Do you have any queries? You can ask in the comments. We, at Modernage answer each and every question, asked in the comments, so If you have any queries, or you want to know about any specific platform you can ask in the comments below

Author

Leave a Reply

girl-carrying-document

More Articles.

girl-carrying-document

More Articles.