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
2 years ago
13

Creating and modifying sets.

Computers and Technology
1 answer:
dsp732 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
So im new how exactly does this point system work???​
lapo4ka [179]

Answer:

Ok so basicly every time you see a question and you can answer it you press on the answer bar you type in your answers then you will automaticly get points depending on the question you answer, you need to get more than 5+ to ask a question  of your own

Explanation:

5 0
2 years ago
What benefit does internet have​
Licemer1 [7]
Information can be transferred and passed way easier.
5 0
3 years ago
4.In order for a driver to graduate from a learner’s license to an operator’s license, how many hours of driving need to be docu
Illusion [34]

Answer and Explanation

In the United States of America, driver's licenses are issued by each individual state, territory.

In order for a driver to graduate from a learner's license to an operator's license, how many hours of driving you need to be documented is 50 hours, of which 10 hours must be at night.To move on to your intermediate driver's license, you must: Be at least 16 years old .

8 0
3 years ago
Discuss All control statements supported by Go
elixir [45]

Answer:

The golang control flow statements are used to break the flow of execution by branching, looping, decision making statements by enabling the program to execute code based on the conditions. All programmers must know the control flows like if-else, switch case, for loop, break, continue, return.

Explanation:

4 0
2 years ago
Why is graphics important in multimedia application <br>​
erastova [34]
Graphics are important in multimedia application this is because humans are visually oriented etc.
5 0
2 years ago
Other questions:
  • Once you have selected the range of cells for your table data, from which tab can you open the Insert Table dialog box?
    6·2 answers
  • Desktop computer systems are less reliable than laptop computers. <br> a. True <br> b. False
    9·1 answer
  • Top/bottom rules allows user to apply conditional formatting cells that fall within the top or bottom numbers or percentile. how
    7·1 answer
  • When should recursion be avoided?
    9·1 answer
  • Though most of the content on this social network is uploaded by amateurs, many companies offer streaming video content related
    10·1 answer
  • Consider the code below. When you run this program, what is the output if the temperature is 77.3 degrees Fahrenheit?
    6·1 answer
  • Arrays of structures ________. Group of answer choices None of the above. are automatically passed by reference cannot be passed
    6·1 answer
  • How do you open an application on the macOS?
    11·2 answers
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
  • Rr lyrae stars pulsate, but with shorter periods and lower luminosities than cepheids. true false
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!