Question

Write a Python program that asks for a series of names that will be provided below....

Write a Python program that asks for a series of names that will be provided below. Print out the names that are unique to the entered names.

The test data to use is: Fred, Wilma, Fred, Barney, Betty, Peebles, Dino, Fred, Wilma, Betty, Peebles, Dino, Fred.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
s = input("Please enter comma space separated names: ")
lst = []
for x in s.split(", "):
    if x not in lst:
        print(x)
        lst.append(x)

Add a comment
Know the answer?
Add Answer to:
Write a Python program that asks for a series of names that will be provided below....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Python • Write a program that asks for the names of all of the classes you...

    Python • Write a program that asks for the names of all of the classes you are taking this semester • Save these class names in a list • Print all the items in the list, one per line

  • THIS IS A PYTHON PROGRAM student.txt Ann Bob Carla Dennis Eric Frank Greg Harry faculty.txt Fred...

    THIS IS A PYTHON PROGRAM student.txt Ann Bob Carla Dennis Eric Frank Greg Harry faculty.txt Fred Wilma Betty Barney Slate Gazoo staff.txt Karen Bob Carla Joan DeeDee Michelle alumni.txt John Jane Wilma Barney Gazoo DeeDee Joan Suppose you have been provided four (4) input files that contain the names of persons who are affiliated with Clark Atlanta University in various capacities. You have been asked to write a Python program - that uses "sets" - to complete the following tasks:...

  • Write a Python program that keeps reading in names from the user, until the user enters...

    Write a Python program that keeps reading in names from the user, until the user enters 0. Once the user enters 0, you should print out all the information that was entered by the user. Use this case to test your program: Input: John Marcel Daisy Samantha Nelson Deborah 0 ================ Output: John Marcel Daisy 25 Samantha Nelson Deborah Hints: Create an array Names to hold the input names. Use the Names.append(x) function to add a new name to the...

  • Python Simple Programming Write a program in Python that calculates the tip and total for a...

    Python Simple Programming Write a program in Python that calculates the tip and total for a meal at a restaurant. When your program is run it should ... Calculate the tip and total for a meal for a restaurant Print the name of the application "Tip Calculator" Get input from the user for cost of meal and tip percent Print the tip and total amounts. The formula for calculating the tip amount is: tip = cost of meal * (tip...

  • Write a PYTHON program that asks the user for the name of the file. The program...

    Write a PYTHON program that asks the user for the name of the file. The program should write the contents of this input file to an output file. In the output file, each line should be preceded with a line number followed by a colon. The output file will have the same name as the input filename, preceded by “ln” (for linenumbers). Be sure to use Try/except to catch all exceptions. For example, when prompted, if the user specifies “sampleprogram.py”...

  • Python Write a program which asks the user keep inputting values on a line followed by...

    Python Write a program which asks the user keep inputting values on a line followed by enter until they enter a blank line, at which point the program should print the number of lines entered (excluding the blank).

  • Python Programming Q.3) Write a program that repeatedly asks the user to enter words until they...

    Python Programming Q.3) Write a program that repeatedly asks the user to enter words until they enter a period ("."). Your program should then print all of the words they entered including the period) on a single line separated by spaces. For example, Enter some words (. to stop): > hello > world hello world.

  • Write a python program that does the following. a. It asks the user to enter a...

    Write a python program that does the following. a. It asks the user to enter a 5-digit integer value, n. b. The program reads a value entered by the user. If the value is not in the right range, the program should terminate. c. The program calculates and stores the 5 individual digits of n. d. The program outputs a “bar code” made of 5 lines of stars that represent the digits of the number n. For example, the following...

  • For each problem, you must: Write a Python program Test, debug, and execute the Python program...

    For each problem, you must: Write a Python program Test, debug, and execute the Python program Save your program in a .py file and submit your commented code to your Student Page. Note regarding comments: For every class, method or function you create, you must provide a brief description of the what the code does as well as the specific details of the interface (input and output) of the function or method. (25 pts.) Write a program that reads in...

  • Description: Write a program that asks the user to enter a series of numbers, and report...

    Description: Write a program that asks the user to enter a series of numbers, and report the following: • The maximum number in the series • The minimum number in the series • The average of all positive numbers in the series The user will enter a pound key ‘#’ to stop the series. in Python

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT