I'll help with the first - similar logic applies to the second. The definition of the limit requires that as x approaches the 0 the value of f(x) gets "closer and closer" to the limit 'L,' meaning that while it doesn't have to actually equal L it gets closer than any arbitrary error (epsilon) that you can name. For this problem you first need to know that for any value of x there are an infinite number of rational and irrational numbers between 0 and x, so the value of f(x) alternates between 0 and x/2 an infinite number of times. But you can see that as x gets close to 0 the value of x/2 also gets close to zero. So if I challenge you by asking what value of x will guarrantee that f(x) is less than, say, 0.01, you can see that this is true if x<= 0.02. For all values less than 0.02 the value of f(x) is less than 0.01. Thus this function passes the "epsilon-delta" test - for any epsilon you can name (0.01 in this exampe) it's possible to find a delta below which f(x)< epsilon.
Now think about the second problem - as x gets small and approaches zero what value - if any - does f(x) approach?