Skip to content

Instantly share code, notes, and snippets.

@dimnikolos
Last active March 15, 2018 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimnikolos/8630a2e3b1075f7733addb585bc59d6a to your computer and use it in GitHub Desktop.
Save dimnikolos/8630a2e3b1075f7733addb585bc59d6a to your computer and use it in GitHub Desktop.
from fractions import Fraction
def mixed(k):
m = int(k)
f = k-m
if m == 0:
return(str(f))
if f == 0:
return(str(m))
return(str(m) + " " + str(f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment