Computer Science, asked by negajod963, 3 months ago

ask user for names, add them to array and find length of array using loop​

Answers

Answered by jai696
9

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

def name_counter(names):

counter = 0

for name in names:

counter += 1

return counter

names = [name for name in input("enter names: ").split()]

print(f"No of names: {name_counter(names)}")

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

Similar questions