The textbook by Sumita Arora
The input() function returns a string. To compare with an integer, convert using int(age) . Forgetting this causes a TypeError , not SyntaxError . Check your colon at the end of if statement too. sumita arora ip book class 11