NiCE Interview Question

In online tests, they asked to code for calculating parking fee based on some conditions