(Solved):Using pseudocode and a flowchart, design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents. View Answer…

 

Question

Using pseudocode and a flowchart, design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents.

 

EXPERT ANSWER

Pseudocode:

print('nn')
names = list()
print('Enter 10 names: ')
for i in range(int(10)):
name = input("Enter name: ")
names.append(name)
print('Names before Sorting: ',names)
names.sort()
print('Names After Sorting: ',names)

We are so grateful for the pleasure of serving you and hope we

Scroll to top