Name buddy | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Name buddy

Can you help me, please… This cod works with all tasks except one, that’s locked. I don’t know what the problem is. Thanks for helping! :) https://code.sololearn.com/cJj5z48SC0hz/?ref=app

22nd Jun 2023, 11:40 AM
Michael Ivanov
Michael Ivanov - avatar
15 Answers
+ 12
Michael Ivanov , Post your attempted code...to see what the problem your code is having ...
22nd Jun 2023, 12:29 PM
Riya
Riya - avatar
+ 8
Dragon RB , Oh thank you i didn't know the code coach problem statement i just modified the code which is posted
23rd Jun 2023, 10:57 AM
Riya
Riya - avatar
+ 8
Michael Ivanov , https://code.sololearn.com/cyOIRP6N48vW/?ref=app Try this...i modified my above code a Lil .. https://code.sololearn.com/cJCAdQDeotY7/?ref=app if still there is error...i lil modified the condition statement... that even if you give input in uppercase...it will convert to lowercase and compare it....
23rd Jun 2023, 11:18 AM
Riya
Riya - avatar
+ 8
Michael Ivanov , It works... make sure that the indentations are proper in your code....
24th Jun 2023, 1:47 AM
Riya
Riya - avatar
23rd Jun 2023, 10:47 AM
Riya
Riya - avatar
+ 4
Show your attempt
23rd Jun 2023, 8:29 AM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
+ 2
Michael Ivanov Please do not paste your code in the comment section or paste the whole code in the description!! Prefer give us a link to your code in SoloLearn, so we can see the output.
23rd Jun 2023, 9:51 AM
Dragon RB
Dragon RB - avatar
+ 2
Michael Ivanov SoloLearn menu -> Create -> new code -> Choose language -> Write your code here -> save -> name your code(make code public would make the code visible to everyone, but I think when posting code in Q&A you should mark as private) -> save. Now, in comment section, click on the "+" button -> insert code -> my code bits -> click on the code you need help.
23rd Jun 2023, 10:10 AM
Dragon RB
Dragon RB - avatar
+ 2
What are you trying to archive?
24th Jun 2023, 12:10 AM
Leeroy Mokua
Leeroy Mokua - avatar
+ 1
Sorry.. Can we see your attempt please??
22nd Jun 2023, 5:25 PM
Dragon RB
Dragon RB - avatar
+ 1
Riya Sis, that won't work. As far as I remember, the code coach tells us to print "Compare notes" if the first character of any person name is equal to the 2nd input's ones. For example: Python Java C++ C# JavaScript #Outputs compare notes(Since first character of JavaScript is equal to Java's ones in the group Python Java C++ C# Kotlin #Outputs no such luck
23rd Jun 2023, 10:55 AM
Dragon RB
Dragon RB - avatar
+ 1
Michael Ivanov I tried Riya's code and it works man
24th Jun 2023, 1:16 AM
Dragon RB
Dragon RB - avatar
0
names=input() my_name=input() letters=[word[0] for word in names.split()] my_letter=[x[0] for x in my_name] for i in letters: if i is my_letter[0]: print('Compare notes') break else: print('No such luck') break
23rd Jun 2023, 9:48 AM
Michael Ivanov
Michael Ivanov - avatar
0
Riya Your cods don’t work Sorry
24th Jun 2023, 1:12 AM
Michael Ivanov
Michael Ivanov - avatar
0
It says: line 5 parsing failed: ‘inconsisting use of tabs and spaces in indentation’
24th Jun 2023, 1:20 AM
Michael Ivanov
Michael Ivanov - avatar