[Tutor] unorderable types

Howard Lawrence 1019shaun at gmail.com
Sat Aug 5 13:35:54 EDT 2017


Typing the : print("type (guess_value)=", type (guess_value))
print("type (number)=",type(number)

type (guess_value)= <class int>
type (number)= <class int>

==============================
the code runs again then prints
type guess_value =< class int>
type number=<class str>

=============================
Now Traceback kicks in
if guess_value < number:
TypeError : unorderable types: int() < str()
============================
Ran the code from Cmd prompt
Got TypeError not supported between
Instance of 'int' and 'str'
=============================
It's seems up till
If guess_value < number:
 guess_value is a integer
 also number which the computer generated
 =============================
Still scratching my head-:(


More information about the Tutor mailing list