I have two piecewise functions and I am trying to work out whether they are Odd, Even or neither. I understand the rules behind finding out whether a normal function is odd, even or neither by using $F(x)= F(-x)$ and $F(-x)= -F(x)$ etc. With these, however, because some are just straight integers with a domain, I do not know how to apply the rules to test out what they are.
The first function is: $$ f(x)=\begin{cases} 4, \quad &0<x<2 \\ -4, \quad &-2<x< 0 \end{cases} $$
This also has a period of $4$.
The second function is: $$ f(x)=\begin{cases} \sin x, \quad &0<x<\pi \\ -1, \quad &\pi<x<2\pi \end{cases} $$
This has a period of $2\pi$.
I understand how to plot the functions, and how to read them. As for working out whether they are odd, even or neither I am completely stuck. Any help would be great, thank you.


Hint Try plotting the two functions.
[First function] What can you say about $f(1)$ and $f(-1)$? Can you generalize this to $f(x)$ for $x > 0$ and $f(x)$ for $x < 0$ using the given definitions?
[Second function] What is $f(-\pi/2)$ and what is $f(\pi/2)$? Can it be odd or even?