Alma Interview Question

Complete the following Python code