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.

euklid_value.py 279B

1234567891011121314
  1. from SoSe24.algodat.foundation import AlgoDatValue
  2. def euklid_ggt(x, y):
  3. while x > 0:
  4. if x < y:
  5. (x, y) = (y, x)
  6. x -= y
  7. return y
  8. if __name__ == "__main__":
  9. print(euklid_ggt(AlgoDatValue(12), AlgoDatValue(8)))
  10. AlgoDatValue.summary()