Bending Spoons interview question

Simple programming in python questions about the expected output