Guest User

Untitled

a guest
Dec 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. _x = float(input('base: '))
  2. x = _x
  3. n = int(input('exponent: '))
  4. i = 0
  5. if n == 0:
  6. print('The result is 1')
  7. else:
  8. while i < n - 1:
  9. x = x * _x
  10. i += 1
  11. print(x)
Add Comment
Please, Sign In to add comment