Godtone (talk | contribs)
m →My Python 3 code: correction
Godtone (talk | contribs)
m →My Python 3 code: correction 2
Line 514: Line 514:
def striv(n, d=None):
def striv(n, d=None):
if d==None and type(n)==tuple and type(n[0])==int and type(n[1])==int:
if d==None and type(n)==tuple and type(n[0])==int and type(n[1])==int:
if len(tuple)==2:
if len(d)==2:
return str(n[0])+'/'+str(n[1])
return str(n[0])+'/'+str(n[1])
elif len(tuple)==3 and type(n[2])==int: # (possible future expansion)
elif len(d)==3 and type(n[2])==int: # (possible future expansion)
return str(n[0])+'/'+str(n[1])+': '+str(n[2])
return str(n[0])+'/'+str(n[1])+': '+str(n[2])
if type(d)==int and type(n)==tuple and type(n[0])==int and type(n[1])==int:
if type(d)==int and type(n)==tuple and type(n[0])==int and type(n[1])==int: