Advertisement
eightmoons

Untitled

Apr 3rd, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. def inputxy():
  2.     x = int(input("Enter X: "))
  3.     y = int(input("Enter Y: "))
  4.     return {
  5.         "x": x,
  6.         "y": y
  7.     }
  8.  
  9.  
  10. def compute(xy):
  11.     x = xy["x"]
  12.     y = xy["y"]
  13.     total = 1
  14.     for i in range(y):
  15.         print(i)
  16.         total *= x
  17.     return total
  18.  
  19.  
  20. def display(total):
  21.     print(total)
  22.  
  23.  
  24. if __name__ == "__main__":
  25.     display(compute(inputxy()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement