fork download
  1. a=4
  2. b=8
  3.  
  4. def nwd(a,b):
  5. while a!=b:
  6. if a>b:
  7. a=a-b
  8. elif a<b:
  9. b=b-a
  10. return a
  11. print(nwd(a,b))
  12. print(b, a/a)
  13. print('=','--')
  14. print(b/a)
  15.  
Success #stdin #stdout 0.03s 9612KB
stdin
Standard input is empty
stdout
4
1.0
= --
2.0