After completing the challenge 2. Same Name it says that you can shorted the function body code (lines 2-4) to just ONE line. I feel like I’m missing something, and there are no further hints.
Do you have a link to the project/challenge?
Not sure I can manage a hint but what does an
if require in the expression and what is that you want returned in the end?
if my_name and your_name are the same, then True is returned
if they aren’t the same I want False returned
It runs like I want it (outputting True and then False), but I’m unsure as to how I can shorten lines 2-4 to just one line.
How do you find out if they’re the same? How would the actual program deal with this, a specific type perhaps? Or, in short, what is
your_name == my_name in the program?
I am a new entrant in coding and i find it rather difficult to learn the Python coding language.
what did you guys do for you to get along with the computer system?
A question like that probably warrants an entire thread. The basic answer is, practice and more practice. Even for lucky folks who take to programming like ducks to water there’s nothing that beats actually using the language, for most of us the answer is probably just more practice . If you need more info/dicussion consider a new question on the forums.