1.

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

Answer»

\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!



Discussion

No Comment Found