Indentation is not working in code editor

TStep - 34his is the test i was trying to do using my android phone.

  1. My correctly indented code is showing differently in the code editor of freecodecamp.
    Here is the incorrect code,

Code

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'

for char in text.lower():
    index = alphabet.find(char)
        print(char, index)
            new_index = index + shift
                new_char = alphabet[new_index]
                    print(new_char)
  1. Here is that code, showing perfectly, but i had to create wrong indented code intentionally to pass the case,

Code

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'

for char in text.lower():
    index = alphabet.find(char)
    print(char, index)
    new_index = index + shift
    new_char = alphabet[new_index]
    print(new_char)

Is that a bug? Please try this step using Android phone and let me know if it’s a bug. I feel so hopeless due to the strange behaviour of the coding shell :pleading_face:

You don’t have the same indentation in the two screenshots.

In the future, please post your actual code instead of screenshots

Kind of hard to tell what’s happening from the screenshots but the code is not correctly indented in the first screenshot, and it is correctly indented in the fCC editor screenshot.

It looks like since you have a small phone screen the
new_char = alphabet[new_index]
line is wrapping around to the next line, kind of like the
alphabet = 'abc...'
line. Is that what you’re talking about?

I’ve updated this post with code. Is there any way to make my editor same as freecodecamp’s shell?
I can’t edit code directly from android device.

I’m using an app named “Coding Python” to write code, as i can’t edit code using my phone directly, it’s having abnormal behave. So, when i write corrected code from different place, and paste it on answer shell, it’s having different indentation, so, correct code is not working.
That’s making me intentionally creating wrong indented code to satisfy the shell’s visualisation.
Is there any way to code in more convenient way?

Well, on a computer.

You could try the freeCodeCamp phone app, here it looks like you are on a browser on the phone?

You could also try a different editor, or maybe this editor has a different way to export the code with the correct indentation. AFAIK if you copy/paste code to the fCC editor indenting is retained. Maybe try a different editor (or the app)

I don’t see why you think the required indentation you posted above is wrong?

@JeremyLT I think this is the problem :

In their other coding app they have to do this:

for char in text.lower():
    index = alphabet.find(char)
        print(char, index)
            new_index = index + shift
                new_char = alphabet[new_index]
                    print(new_char)

and when they copy/paste that into FCC it appears correctly:

for char in text.lower():
    index = alphabet.find(char)
    print(char, index)
    new_index = index + shift
    new_char = alphabet[new_index]
    print(new_char)

Some kind of incompatibility of the app they are using. Not really related to the FCC editor per say.

@Plabon_Kumer_Sarker correct me if I’m wrong?

I’m referring to this

Yes, This seems perfect on fcc after pasting incorrectly indented code from my code editor. If i use correctly indented code, it’s not showing correct indentation on fcc.

Exactly. But for coding contest on atcoder, codeforces, i use same editor and pasting method, it works fine there. I really wish the coding shell on fcc will be more mobile friendly.

did you try the app?

I did. But when i click on the course, it says, Not available use web version.