Question: Write a program that takes two numbers are entered through the keyboard ( say x and y ) . Find the value of second number

Write a program that takes two numbers are entered through the keyboard (say x and y). Find the value of second number raised to the power of the first number, i.e., calculate x^y. Do not use python built-in method that calculates the power/exponent, and see the sample input for clarity. For any invalid input, print Invalid Input .
Sample Input 1: Provide two integers: 10
3
Sample Output 1: Result: 1000
Sample Input 2: Provide two integers: 2
Z
Sample Output 2: Result: Invalid Input
Sample Input 3: Provide two integers: 1
25
Sample Output 3: Result: 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!