Dear All,
I am not only new to python, but completely new to programming in general. So please don't laugh (too much) of this certainly dumb question.
I was going through the first pages of "A Byte of Python" and decided to change a bit one of the models and came up with this:
#!\bin\python3
# Filename: printMax.py
while True:
x = (input('Give a value for \'a\': '))
if x == 'quit':
break
y = (input('Give a value for \'b\': '))
if y == 'quit':
break
def printMax(a, b):
if a > b:
print(a, 'is maximum')
elif a == b:
print(a, 'is equal to', b)
else:
print(b, 'is maximum')
printMax(x,y)
print('Done')
I ran it and I was so happy with it, but then... why on Earth does it tell me that "5" is higher than "24"? Or why does it tell me that "5" is higher than "45"?? Or why "5" is higher than "13"? :-O
I suspect I should somehow specify I am working with decimal integers. Is it so?
Thanks in advance for any possible help.