Revolut Interview Question

Basic Python HackerRank test to complete