Upstart interview question

code a principal interest calculator