+ 4
Can u Fix my code?
Task description: # Create a program that check if you are typin unique letter in every tuch # Input Format: A string of random letters or characters # Output format: A string that say 'Deja Vu' if letter in repetad or 'Unique' if is not repeted # Sample input: aaskjloj Output: Deja Vu Ex. Input aaaaattty. The output will be deja vu Can any one fix my code it failed at 3,4 test https://code.sololearn.com/c0ZQ11W3Tes0/?ref=app
9 Respostas
+ 2
Congratulations Agazi Birhanu . Another solution could be without sorting, if you would compare „len()“ of a and b. If equal that means unique.
+ 5
Thanks it worked
https://code.sololearn.com/cNYU7oup8Psy/?ref=app
+ 3
Agazi Birhanu , I can suggest the following approach based on your code: convert the set of the input to sorted list. Convert the input list in sorted list. Compare both of these lists, if they are not equal print "Deja Vu", otherwise "Unique".
+ 2
We cannot see a Code Coach side. First you have to save it on the Playground and link in your question.
+ 2
The idea is not bad. But at the end you compare false property. Please print your a and b and see what happened. After that I belive you get that.
+ 2
Another approach would be to loop through the input and use the count method or use a dictionary counter.
+ 2
Ya clever one.
+ 1
I am a newbie in coding, how does it work please?
0
It's possible for one to learn coding without having any skills knowledge about argoritin ?