Computer Science, asked by jhalakshah0106, 6 months ago

Write a program to accept 10 names in single dimensional array (SDA). Display all those names whose first letter matches with the letter entered by the user.
Sample Input: Aman Shahi
Amol Patil
Suman Gupta and so on ............. Sample Output: Enter the alphabet
A
Aman Shahi

Amol Gupta
Please answer only if you know!!!

Answers

Answered by valeriy69
0

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

names = [

"Sophia Wilson",

"Emma Moore",

"Eva Ward",

"Oliva Kelly",

"Emily Corry",

"Madison Bolton",

"Claire Brecker",

"Samantha Garcia",

"Taylor Davis",

"Ellie Barbara"]

c = input("enter character: ")

filtered_names = [name for name in names if c == name.split()[0][0]]

print("\n".join(filtered_names))

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by yd8104339950
2

Answer:

...

Explanation:

Wait Jhalak I'll tell this to Eknath Sir

Similar questions