Alma interview question

Complete the following Python code