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
Identify the primary responsibilities associated with each of the following web design roles: content writer/editor, artist/grap
frosja888 [35]

A web designer/developer is responsible for the design, layout and coding of a website. They are involved with the technical and graphical aspects of a website and how the site works and how it looks.

Explanation:

  • A content writer/editor creates and revises the text that visitors read when the visit a website, choose a link, image, video, or other media that enhances your text content.
  • A web artists/graphic designer's responsibility is to create original art, such as logos, stylized typefaces, and avatars, and props for virtual 3-d worlds.
  • A web designer's role is to create webpages that combine, text, images, and links using tools such as markup languages; CCS, HTML, and WYSIWYG editors.
  • Web programmer/database developer's job is to script languages such as, JavaScript, ASP, PHP, and MYSQL and must plan, create, secure, and maintain databases of varying complexity.
  • Web Administrator assumes all roles, including creative, high-tech, and oversight. May oversee a web development team that includes technical and creative roles.
5 0
3 years ago
How is a transaction verified on a cryptocurrency network?.
Agata [3.3K]

Answer:

By being a part of a block to a block chain and each block in the block chain is precisely connected to the block that was before it.

Explanation:

I Hope This Helps You

6 0
2 years ago
Which access object cannot be used to enter or edit data
kap26 [50]

Answer:

Should be B. table !

6 0
2 years ago
Read 2 more answers
What is the iterative procedure of recursive and nonrecursive?
DanielleElmas [232]

Answer:

nonrecursive

Explanation:

3 0
3 years ago
How do you make the task bar and e-mail read in larger print
JulijaS [17]
You have to go into settings and search larger text
5 0
3 years ago
Other questions:
  • "A user reports that the corporate web server cannot be accessed. A technician verifies that the web server can be accessed by i
    8·1 answer
  • Nate specifically wants a template that will work for an application letter. Which features in the New dialog box can
    15·1 answer
  • Machines may aid in making work easier over a longer distance. true or false.
    7·1 answer
  • 20 points for ez question lol
    9·2 answers
  • 4. In Drag and Drop method of Excel , to copy the data , you need to press __________ key while dragging the cells.
    7·1 answer
  • You plan on using cost based pricing. The cost of your product is 10, and you are planning a 30% mark up. What should the price
    14·1 answer
  • Choose the response that best completes the following statement.
    14·2 answers
  • Many phone fraud scammers are expessily cunning because they approach the target to try to sell
    9·1 answer
  • An operating system with _____ capabilities allows a user to run more than one program concurrently.
    6·1 answer
  • Why womt this code work????
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!