Exercise_10:function completed