In python how can I change the silly_string, so that itshows this: (The below is the outcome I need to obtain however, Iam not sure to use the built in functions to have the first letterbe lowercase and the rest uppercase. (Bold is what I need to editso that the program works)
>>> silly_string =silly_case("Hello world")
>>> silly_string'hELLO wORLD'>>> quote = """Computing machines are like thewizards in fairy tales.
... They give you what you wish for,
... but do not tell you what that wish should be.""">>> silly_quote =silly_case(quote)>>> silly_quote'cOMPUTING mACHINES aRE lIKE tHE wIZARDS iN fAIRY tALES.\n tHEYgIVE yOU wHAT yOU wISH fOR,\n bUT dO nOT tELL yOU wHAt tHAt sHOULDbE.'>>> print(silly_quote)cOMPUTING mACHINES aRE lIKE tHE wIZARDS iN fAIRY tALES.
tHEY gIVE yOU wHAT yOU wISH fOR,
bUT dO nOT tELL yOU wHAt tHAt sHOULD bE.
In python how can I change the silly_string, so that it shows this: (The below is the outcome I need to obtain however,
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
In python how can I change the silly_string, so that it shows this: (The below is the outcome I need to obtain however,
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!