hackerrank python solutions if else