Those questions are perfectly reasonable sanity-check tests of basic programming skills (functions, loops, basic arithmetic). That person is not assuming you know how to calculate Pi -- they're telling you how to do it as part of the question.
How can someone be expected to know how to code something if they don't understand the basic concept related to the question? The only time I've ever seen an equation like that was in Trig or Discreet math. Both of which were college level courses. None of which were in basic loops or arithmetic I've learned in actual introductory classes. I cannot calculate the area of a circle without a Unit Circle. I'm sorry but that's just incredibly unfair to assume people just remember all the Trig they did like it was yesterday. Trig's easy, but who uses it on a daily basis? Machinists and Architects probably use it far more than we'll ever use it.