help to solve | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

help to solve

You are building a search system and need to search for the character 'a' in an input string. Output "Match" if 'a' is found in the string, and "No match" if it's not. Sample Input great Sample Output Match

29th Nov 2021, 9:13 AM
Bhupal Raut
8 Answers
+ 5
Just check ✅ indentation in your code
29th Nov 2021, 9:24 AM
Sâñtôsh
Sâñtôsh - avatar
+ 5
Bhupal Raut You have received 2 great answers from Lisa & Sâñtôsh Final word of advice, you don't need to put your word in a list. if 'a' in "bhupal": check indentation else: check indentation
29th Nov 2021, 9:30 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
This forum is for programming related discussion, not for free assignments. Show your try and explain where exactly you want help if you really want to get any help. Have a look at the below guidelines to use this forum in the most efficient way possible https://www.sololearn.com/discuss/1316935/?ref=app
29th Nov 2021, 9:17 AM
Rishi
Rishi - avatar
+ 3
But 'a' in quotes and check the indentation: if and else need to be on the same indentation level
29th Nov 2021, 9:23 AM
Lisa
Lisa - avatar
+ 2
words= ["bhupal"] if a in words: print("Match") else: print("No match")
29th Nov 2021, 9:22 AM
Bhupal Raut
+ 2
result is error
29th Nov 2021, 9:22 AM
Bhupal Raut
0
# Try this one.. words= ("bhupal") if "a" in words: print("Match") else: print("No match")
1st Dec 2021, 7:20 AM
Lakshya Mittal
Lakshya Mittal - avatar
0
Try to compare this (my) code with your code and you will find the errors in your code...👍
1st Dec 2021, 7:22 AM
Lakshya Mittal
Lakshya Mittal - avatar