Would Get Sentinel Value Work Program Assignment Input Name Lastname First Name Switch Dis Q37093088

How would I get a sentinel value to work in this program? theassignment is to input a name in lastname first name and have itswitch and display the name in Firstname, Lastname, however I can’tthe sentinel value to work, It also prints the value enteredforever. Here’s the program, running on python 3.4:

Name=input(“Enter your name lastname first separated by a comma(Lastname, Firstname) OR STOP to exit: “)
while Name != STOP:
NameList = Name.split(“,”)
NameList.reverse()
print(NameList)
Name=input(“Enter your name lastname first separated by a comma(Lastname, Firstname) OR 0 to exit: “)
print(“thank you for using this app.”)


Solution


Name=input(“Enter your name lastname first separated by a comma

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.