Find the best answers to your questions at Westonci.ca, where experts and enthusiasts provide accurate, reliable information. Get quick and reliable solutions to your questions from a community of experienced experts on our platform. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform.
Sagot :
Answer:
The solution is implemented in python:
numnames = int(input("Number of Names: "))
nametitle = ["Surname: ","Firstname: ","Middlename: ","Middlename 2: "]
names = []
for i in range(numnames):
name = input(nametitle[i])
names.append(name)
print("Your fullname is: ",end=" ")
for i in names:
print(i,end=" ")
Explanation:
This prompts user for number of names
numnames = int(input("Number of Names: "))
This lists the name titles in a list
nametitle = ["Surname: ","Firstname: ","Middlename: ","Middlename 2: "]
This initializes an empty list
names = []
The following for loop get names from the user
for i in range(numnames):
name = input(nametitle[i])
names.append(name)
The following instructions print the user fullnames
print("Your fullname is: ",end=" ")
for i in names:
print(i,end=" ")
Visit us again for up-to-date and reliable answers. We're always ready to assist you with your informational needs. We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Westonci.ca is here to provide the answers you seek. Return often for more expert solutions.