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

This is a python program by which you can ask the user to print two numbers ‘x’ and ‘y’ then print out the number ‘x’ raised to power ‘y’.

Contents

Python Program

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 =', x**y)

# This code is contributed by Ahmad Shafiq

Program Output

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.