If/else not working properly


#1

Hey, folks.

I’m working on exercises 3-5 & it lets me pass the levels, but something isn’t right. It’s ignoring the .isalpha and also the Else, which keeps printing “empty”, even when the If condition is True.

What am I doing wrong? Thanks for any help.!

python|690x269


#2

Please help us to help you by posting,

  1. A link to the exercise;
  2. Your complete code;
  3. Any error messages.

#3

Oops, apologies.

Here’s the complete screen, with error message.

The exercise is at
https://www.codecademy.com/courses/learn-python/lessons/pyglatin/exercises/check-yourself-some-more

It allows me to hit Next to move to the next exercise despite the error(s), as did the previous exercise despite the issue with it printing both the If & Else outcomes.


#4

The SCT is not exhaustive and may have let the error slip under the radar.

Remove the line after the input so original doesn’t print before the if statement.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.