A little test project for B.Y.O.P
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
459 B

  1. #!/usr/bin/python3
  2. def add(x, y):
  3. return x + y
  4. def mod(x,y):
  5. return x % y
  6. def div(x,y):
  7. return x / y
  8. def main():
  9. x = int(input("Input x: "))
  10. y = int(input("Input y: "))
  11. # returns x + y
  12. addition = add(x, y)
  13. print(addition)
  14. # sub(x, y) returns x - y
  15. # mult(x, y) returns x * y
  16. modulus = mod(x,y)
  17. print(modulus)
  18. # mod(x, y) returns x % y
  19. # expo(x, y) returns x ** y
  20. if __name__ == "__main__":
  21. main()