What is the mistake here? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

What is the mistake here?

https://code.sololearn.com/cH7cC4NtwM48/?ref=app Can anyone help me?

29th Nov 2022, 8:29 AM
Riya
Riya - avatar
7 Answers
+ 3
Condition : if b in a : either true or false in all iteration of the loop. So answer 0 or 100%. It should be if i in b : is not it?
29th Nov 2022, 8:34 AM
Jayakrishna 🇮🇳
+ 4
Jayakrishna🇮🇳 thank you...I understood now...
29th Nov 2022, 8:36 AM
Riya
Riya - avatar
+ 3
Jayakrishna🇮🇳 it looks more compact thank you so much
29th Nov 2022, 8:56 AM
Riya
Riya - avatar
+ 1
You're welcome.. edit: instead of loop you can use count function as len_c = a.count(b) # len_c/len(a) *100
29th Nov 2022, 8:37 AM
Jayakrishna 🇮🇳
+ 1
The only mistake I see is my mother's decision to have me
30th Nov 2022, 6:47 PM
Nexxt Meme
Nexxt Meme - avatar
0
How to make calculator in java??
1st Dec 2022, 4:11 AM
Hit dalsaniya
Hit dalsaniya - avatar
0
There is no mistake here. The program is absolutely correct
3rd Jan 2023, 5:18 PM
Sasi Kumar