+ 1

incorrect here guys

You need to put input (int (give me a number)) because input will automatically make it a string.

16th Nov 2016, 6:49 PM
Tom Salt
Tom Salt - avatar
4 ответов
+ 1
Huh! Makes sense, I guess. Thanks for sharing.
16th Nov 2016, 6:51 PM
NICKALL [EP]
NICKALL [EP] - avatar
+ 1
You may see a few examples like this; I finally decided they were going for clarity. A couple places where string input might be desirable: On hackerrank, one of the early challenges is to work with integers that are larger than can be stored in the data type; you could do this in a bridge string. Scanners that inject keystrokes; they may read garbage, currency symbols, commas, () etc. You might want to catch/extra validate some of this before int/float/etc.
16th Nov 2016, 10:36 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
I totally left out something from my Python study; I originally didn't follow it very far. Python supports arbitrary-precision integers...'big' integers limited by available memory. Included to support both Tom and my ramble.
17th Nov 2016, 12:53 AM
Kirk Schafer
Kirk Schafer - avatar
- 1
you can also write as int(input("enter value")) for taking input as integer float(input("enter value))" for taking float as input only writing input will be considered as string.. just remember to mention data type before input statement
13th Dec 2016, 4:48 PM
Bhavana
Bhavana - avatar