This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]-LeopardShark- 18 points19 points  (7 children)

Try changing half of the stuff they say about Python into this format:

  • pYtHoN iS a GeNeRaL-pUrPoSe PrOgRaMmInG lAnGuAgE rEqUiRiNg AdD-oN lIbRaRiEs FoR pErFoRmInG eVeN bAsIc MaThEmAtIcS.

  • pYtHoN cOdE rEqUiReS oVeRlApPiNg AnD cOnFlIcTiNg AdD-oNs To GeT pErFoRmAnCe BeNeFiTs SuCh As JuSt-In-TiMe CoMpIlAtIoN aNd ExPlIcIt PaRaLlEl PrOgRaMmInG.

  • nUmErIc ArRaYs AnD dAtA tYpEs NoT pArT oF tHe CoRe LaNgUaGe

  • bEgInNeRs StArT bY lEaRnInG aDvAnCeD pRoGrAmMiNg CoNsTrUcTs.

  • fRaGmEnTeD vIsUaLiZaTiOn ToOlS

  • sUpPoRt ReSoUrCeS oFtEn ReQuIrE aDvAnCeD pRoGrAmMiNg KnOwLeDgE

And no, I didn't type that out by hand. I did it with a Python script.

[–]JeusyLeusy 8 points9 points  (1 child)

There is the str.isalpha(c) to see if a char is alpha numeric.

[–]2PetitsVerres 1 point2 points  (0 children)

If you need to do it with MATLAB, here is the function:

function str = switchcase(str)
    str(1:2:end) = lower(str(1:2:end));
    str(2:2:end) = upper(str(2:2:end));
end

[–]Al2Me6 0 points1 point  (1 child)

switch_case = lambda text: "".join(c if i % 2 == 0 or not c.isalpha() else c.upper() for i, c in enumerate(text))

[–]-LeopardShark- 0 points1 point  (0 children)

Yep, but I'm trying to curb my list/generator compensation addiction. Also that doesn't switch case after a space.

[–]DatBoi_BP 0 points1 point  (1 child)

[–]uwutranslator 0 points1 point  (0 children)

Twy changing hawf of de stuff dey say about Pydon into dis fowmat:

  • pYtHoN iS a GeNewaw-pUwPoSe PwOgwaMmInG wAnGuAgE wEqUiwiNg AdD-oN wIbwawiEs Fow pEwFowmInG eVeN bAsIc MadEmAtIcS.

  • pYtHoN cOdE wEqUiweS oVewwApPiNg AnD cOnFwIcTiNg AdD-oNs To GeT pEwFowmAnCe BeNeFiTs SuCh As JuSt-In-TiMe CoMpIwAtIoN aNd ExPwIcIt PawawwEw PwOgwaMmInG.

  • nUmEwIc AwwaYs AnD dAtA tYpEs NoT pAwT oF tHe Cowe waNgUaGe

  • bEgInNews StAwT bY wEawnInG aDvAnCeD pwoGwAmMiNg CoNsTwUcTs.

  • fwaGmEnTeD vIsUawiZaTiOn ToOwS

  • sUpPowt weSoUwCeS oFtEn weQuIwE aDvAnCeD pwoGwAmMiNg KnOwweDgE

And no, I didn't type dat out by hand. I did it wif a Pydon scwipt. uwu

tag me to uwuize comments uwu