1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ozzi
3 years ago
13

Creating and modifying sets.

Computers and Technology
1 answer:
dsp733 years ago
4 0

Answer:

Explanation:

The following Python code asks the user for inputs for the name to remove and add in the set. It then tries to remove the given name from the list. If it fails it prints out to the user saying that the name does not exist. If it does exist then it removes the name and adds the new name. Finally it prints out the current list of names.

male_names = {'oliver', 'Declan', 'Henry'}

name_to_remove = input("Enter name to remove: ")

name_to_add = input("Enter name to add: ")

try:

   male_names.remove(name_to_remove)

   male_names.add(name_to_add)

except:

   print("Name that you are trying to remove does not exist")

print("List of Names: ")

print(male_names)

You might be interested in
When does playstation charge formy new subscription
BlackZzzverrR [31]
Right when you pay for subscription to PSPlus the timer starts and after 30 days it will end ( if you got the 1 month subscription) This is the same for 3 month and 1 year subscription
3 0
4 years ago
What is a registered degree
dezoksy [38]

Answer:

I not sure

Explanation:

I think it's when a college student gets a degree for a job or something??? I dont know. I to young to know ;-;

lol

5 0
3 years ago
How do you know that the computer is infected by virus​
Olegator [25]
  1. Slow computer performance (taking a long time to start up or open programs)
  2. Problems shutting down or restarting.
  3. Missing files.
  4. Frequent system crashes and/or error messages.
  5. Unexpected pop-up windows.
6 0
2 years ago
2. What is the name for an action performed by the VR Robot?
pychu [463]
Parameter is the answer you wanted
4 0
3 years ago
Read 2 more answers
What is the function of an ISP,a browser and a mobile browser?​
ruslelena [56]

An internet service provider (ISP) is a company that provides web access to both businesses and consumers. ISPs may also provide other services such as email services, domain registration, web hosting, and browser services.

The purpose of a web browser is to fetch information resources from the Web and display them on a user's device. This process begins when the user inputs a Uniform Resource Locator (URL), such as wikipedia.org, into the browser.

A mobile browser is a web browser designed for use on a mobile device such as a mobile phone or PDA. Mobile browsers are optimized to display Web content most effectively for small screens on portable devices.

8 0
3 years ago
Other questions:
  • 5. Create a vector called to20 that goes from 1 to 20 (use the range notation). Now create a variable called end that goes from
    9·1 answer
  • How can a network design project benefit from the principles of itsm? How might itsm impede a network design project?
    11·1 answer
  • Write a program that reads a series of strings andprints only those strings beginning with the letter "b."
    7·1 answer
  • You can easily view the ruler on a document by selecting the Show Ruler button located _____.
    11·2 answers
  • How do I delete my brainly account?<br> I don't need anymore.
    13·2 answers
  • Which of the following would be done outside of a control room?
    5·2 answers
  • Write a program that uses the Purchase class in 5.13. Set the prices to the following: Oranges: 10 for $2.99 Eggs: 12 for $1.69
    11·1 answer
  • What is coupling in computer science <br><br>​
    13·2 answers
  • True or false: Because there are so many different network configurations, operating systems, and strategies, it is a challenge
    14·1 answer
  • What is the role of the computer in banking system?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!