Hello @KodeKloud,
Please consider different solution to this lab. Please check that calculator works as asked by the question:
I checked the hint solution where I realized that my solution could have 2 lines less, I know it is different but my solution works with 6 lines less.
Please check