+ 1
what is the problem withthis code
def a(x,y): s=str(x) r='' ind=len(s) while ind>0: r+=s[ind-1] ind-=1 q=print(r[0]) d=str(y) w='' ind1=len(d) while ind1>0: w+=d[ind1-1] ind1-=1 e=print(w[0]) if r>w: print(x) elif r<w: print(y) x=int(input('enter first number ')) y=int(input('enter second number ')) print(a(x,y)) i want to check the highest one'place digit only
1 Respuesta
+ 1
You'll see some numbers being printed. That's due to "q = print(r[0])" and "e = print(w[0])".
if r > w:
return x
else:
return y