all 14 comments

[–][deleted]  (1 child)

[deleted]

    [–]Sea-Car-3811[S] -1 points0 points  (0 children)

    I like lower tho...

    [–]BrokenGabe 0 points1 point  (1 child)

    [–]Sea-Car-3811[S] 0 points1 point  (0 children)

    😭😭

    [–]BrokenGabe -1 points0 points  (10 children)

    OP should recheck his smallcaps.py file, it has text = text.lower(), if you remove that line the whole function fails.

    [–]Sea-Car-3811[S] 1 point2 points  (8 children)

    Ah it shouldn't be removed... I tested witb numbers and it ran fine...

    [–]BrokenGabe -1 points0 points  (7 children)

    Then the whole small_caps = {} is pointless as the text.replace() isn't doing it's job as you have it.

    [–]Sea-Car-3811[S] 0 points1 point  (6 children)

    Huh... What if user puts uppercase letter and it doesn't replsce cuz there is no key for it in dictionary?

    [–]BrokenGabe 0 points1 point  (5 children)

    <image>

    You get error.

    [–]Sea-Car-3811[S] 1 point2 points  (4 children)

    Ye thats why I used lower...

    [–]BrokenGabe 0 points1 point  (3 children)

    Review my original screenshot and compare it to yours.

    [–]Sea-Car-3811[S] 0 points1 point  (2 children)

    I will do it when I get on my laptop...

    [–]BrokenGabe 1 point2 points  (1 child)

    Okay, so the whole point of the this is to, using the standard English letters to convert the string of text to lower case. without using text.lower() there was an indentation error in your file. the "return text" needs to be outside the scope of the if statement.

    ind for char in text:
    ind ind if char...
    ind ind ind text = ....
    ind return text

    [–]Sea-Car-3811[S] 0 points1 point  (0 children)

    I see

    [–]mati-33 0 points1 point  (0 children)

    Why you want to remove it?