Quoting John Carmona <[EMAIL PROTECTED]>: > Hi John, thanks for the reply.
Hey John, Please reply to the list, rather than to people directly. Clicking "reply to all" is probably what you want. > Ok No. 1, I have read about "ctime" which convert a time expressed in > seconds since the epoch to a string representing local time Nah, it's much, much simpler than that. time.time just returns a floating point number. How do you convert a number into a string? > No. 3 why do I need to convert them into an integer, if I manage to get > the last 2 character this will be a whole number, no? Programming languages differentiate between numbers and strings. 32 is a number; you can do computations with it (add, multply, etc). "32" is a string; this means it is the character "3" followed by the character "2". Python (and most other programming languages) treats them very differently. example: >>> x = 32 >>> x + 1 33 >>> x * 3 / 4 24 >>> s = "32" >>> s + "1" '321' >>> s + "foo" '32foo' You have to decide what you need. Your program compars numbers with the answer (your random number). In order to do this comparison, you need to have your answer as a number, not as a string. Hope this helps. -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor