Logo
Explore Help
Sign In
ada/why3
0
0
Fork 0
You've already forked why3
mirror of https://github.com/AdaCore/why3.git synced 2026-02-12 12:34:55 -08:00
Code Issues Packages Projects Releases Wiki Activity
Files
master
why3/examples/python/pgcd.py

13 lines
213 B
Python
Raw Permalink Normal View History

another micro-Python example
2021-01-28 13:43:59 +01:00
def pgcd(a, b):
#@ requires a > 0 and b > 0
while a != b:
#@ invariant a > 0 and b > 0
#@ variant a + b
if a < b:
Python: Added examples - New examples using the new syntax (+=, ...) - New examples using the new methods (.pop(), .append(), ...) - Update old examples with assignement operators (+=, ...)
2021-06-23 17:45:21 +02:00
b -= a
another micro-Python example
2021-01-28 13:43:59 +01:00
else:
Python: Added examples - New examples using the new syntax (+=, ...) - New examples using the new methods (.pop(), .append(), ...) - Update old examples with assignement operators (+=, ...)
2021-06-23 17:45:21 +02:00
a -= b
another micro-Python example
2021-01-28 13:43:59 +01:00
return a
Reference in New Issue Copy Permalink
Powered by Gitea Page: 1150ms Template: 4ms
English
English
Licenses API