For any and all questions relating to Challenge 2 post away!
I believe there must be a mistake in the instructions
Required format: #DOT!
but none of the options will add the extra characters. I was able to solve it because there wasnât any other way around it, but please verify what the output must be.
If the solution you picked is correct but youâre not sure how to add extra characters to a string, I would recommend looking at each of the functions shown in your choice.
Yeah, I know how to add the extra characters. Itâs just that none of the solutions will have that part in the functionality.
I think the â+â operator is implied to be used to add extra characters. Itâs included in every option though.
I went overboard and f-stringâd it with the concatenated # and ! symbols. I shouldâve checked the multiple choice answers first.
Of course, the â+â operator is used for concatenating strings together.
Solved it? @Eltrion
Hello everyone! I am Kelvin, a data science mentor with Lighthouse labs. I will be moderating this forum for the next 2 hours. Please you can ask any questions and feel free to discuss amongst yourselves without sharing answers.
Hi all, with fear of getting kicked/freezed out from Jupyter Notebook and lose my code (almost happened yesterday), I used another IDE today but forgot to paste my code into the Notebook before submitting my answer. Will that affect my points or chances in any way?
I was very confused about this question; I first went to the articles that were linked under the question but that confused me even more. I wouldâve appreciated an example of how to add the extra characters (# and !) because I did not understand how to format those so they would appear.
- Wonât affect points as points are based on whether they get the correct multiple choice answer
- In terms of saving the code, if you want to keep it for future reference, you can copy it somewhere else as suggested in the FAQ. Once you complete the challenge, itâll show the solution version. But what you run in the code/notebook doesnât affect points
- The freezing of BinderHub I assume is referring to that 1hr outage yesterday - which shouldnât happen again
For those stuck on adding multiple methods to a variable string, donât overthink it - just add another method the same way you added it the first time, example: variable_name.title().strip()
Hereâs all the Py String methods for the curious minded: Python String Methods
OMG i did .strip().upper() and it was giving error. Then I switched the order to .upper().strip() and now it worked. That took me more than 1hr to figure out!!!
Where should I go to understand the multiple choice responses of this challenge? I connected strings to get #DOT! to show in the terminal. I think Iâm going somewhere?
This is badly worded question. They example shown talks about using fâ to make concatenated strings, while in the question, they want you to use:
âstring 1â + " when added" + " together" to produce âstring 1 when added togetherâ.
How did you concatenate the strings together? Did you use the fâ{} method or did you use another way?
They want you guys to use a few string methods to:
-remove all the whitespace
-make all the letters UPPERCASE
Look up âstring methodsâ and Iâm sure youâll find a few. Finally they want you to use a form of string concatenation not shown in the example (are there other ways to concatenate strings without f-string?).
(Once again, Google is your friend)
Iâm very new to coding (have never done it before) but I believe what I used would not be considered the fâ{} string.
The alternatives do not show the answer but the way to get it.
In the tutorial section above the challenge it links to a page about python strings. Lots of good information there which explains the options.