+ 5

what wrong in my code? help please

look at my code please, it should find if number (input) is even or odd. https://code.sololearn.com/cdO0a6J5OqJW/?ref=app

10th Jun 2018, 7:53 AM
I -_- D
I -_- D - avatar
3 Answers
+ 10
When you take input, the value is in the form of string so you can't perform arithmetic operations on it...You can convert it to a number by the int() function.. Fixed code ~ https://code.sololearn.com/cTFV4ZjPALzF/?ref=app Some more explained in the Comments in the Code
10th Jun 2018, 8:00 AM
Nikhil
Nikhil - avatar
+ 3
^ and print("is odd", num) cant sum int and str
10th Jun 2018, 7:59 AM
Markus Kaleton
Markus Kaleton - avatar
+ 2
Nikhil Markus Kaleton thank you, I got it 👍👍
10th Jun 2018, 8:04 AM
I -_- D
I -_- D - avatar