0

Do I need nums before input if I'm using math for example X=input() Print(x+2) Or is this right?

24th Dec 2016, 8:08 PM
Nate
4 odpowiedzi
+ 7
Yes you need (also be careful of case-sensitivity of vars) because if input is string x + 2 will do concatenation
24th Dec 2016, 8:10 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 2
to input numbers x=int(input()) you must put int or float before input() or convert the input after
24th Dec 2016, 8:19 PM
Minovsky
Minovsky - avatar
+ 1
Thank you it automatically does caps
24th Dec 2016, 8:13 PM
Nate
+ 1
Thank you very much
24th Dec 2016, 8:28 PM
Nate