Categories
Post

Interview Question

Spread the love

The interview question I gave yesterday was:


Write a function that takes a single string as input.


The string will be one of five values.
Each value corresponds to one of five other functions.
Your function should execute the correct corresponding function for each.
e.g. if you get “aaa” you should run the function named aaa()


There are many solutions.
Which would you choose and why?

Here is a link to a couple of solutions:

https://replit.com/@kevinelong/interview-question#main.py

Here is a video where I go a little further:

https://us02web.zoom.us/recording?from=client&_x_zm_rtaid=hvQRcXD8Q-ODeGHrr9Vvng.1626546374917.d5f34aa4d742944f15ad271d5908fc2c&_x_zm_rhtaid=877

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.