Timeline for Guessing Game in Python
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 16, 2014 at 22:31 | history | bounty ended | tda | ||
Apr 16, 2014 at 15:04 | comment | added | Veedrac |
Normally people would write print '... from', MINIMUM, 'to', MAXIMUM for this if they wanted to avoid % or .format .
|
|
Apr 16, 2014 at 1:23 | comment | added | David Harkness |
Bummer. The string interpolation should, though. The %s should be %d to handle integers. It's been some years since I last wrote Python.
|
|
Apr 16, 2014 at 1:14 | vote | accept | tda | ||
Apr 16, 2014 at 1:10 | history | edited | asteri | CC BY-SA 3.0 |
added 26 characters in body
|
Apr 15, 2014 at 23:12 | comment | added | asteri | @DavidHarkness Pretty sure it doesn't automatically cast them to strings. I have Python 3 installed and it doesn't cast implicitly under that. Don't have Python 2.7 to test on. | |
Apr 15, 2014 at 23:10 | comment | added | David Harkness |
Do you really need to cast those constants to strings? Doesn't adding to a string do that already? Alteratively, you could use string interpolation: print '... from %s to %s' % (MINIMUM, MAXIMUM)
|
|
Apr 15, 2014 at 22:42 | history | edited | asteri | CC BY-SA 3.0 |
added 96 characters in body
|
Apr 15, 2014 at 22:32 | history | edited | asteri | CC BY-SA 3.0 |
added 2118 characters in body
|
Apr 15, 2014 at 22:20 | history | answered | asteri | CC BY-SA 3.0 |