Welcome @Raj_Chiranjeevi to the forum.
This took me a while to get my head around too, but as @nellietobey says, it’s because the print function doesn’t return a value, it just prints to terminal, hence the ‘None’ value.
A lot of the book gets you to print to screen in each example so you get into the habit of that behaviour. In reality, you are more likely to be returning a value than printing it.
One way to practice this is to set the print statement to a variable, and then call that with the print function. That way you are separating the function return from the print to screen action.
Using Nellie’s example tweeked a bit…
# define the function and return the potential output
def modular (something):
x = something % 2
#print the output separately with actual input value