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
You asked your colleague to provide feedback on a blog post you recently wrote. When they sent you their feedback, they made edi
Soloha48 [4]

Explanation:

This question can have both answers that is yes as well as no.

1.Yes, it can serve as an editor who completes your content and ensures it will read well to others.

2. No, the editor should have tracked changes which would have shown you where they would apply recommended edits.

7 0
4 years ago
PLEASE WRITE A ONE SENTANCE SUMMARY, WILL GIVE BRAINLIEST!! (history of computers) You have completed an extensive investigation
vladimir1956 [14]

Answer:

Charles Babbage, (born December 26, 1791, London, England—died October 18, 1871, London), English mathematician and inventor who is credited with having conceived the first automatic digital computer.

Explanation:

The idea of mechanically calculating mathematical tables first came to Babbage in 1812 or 1813. Later he made a small calculator that could perform certain mathematical computations to eight decimals. Then in 1823 he obtained government support for the design of a projected machine, the Difference Engine, with a 20-decimal capacity. The Difference Engine was a digital device: it operated on discrete digits rather than smooth quantities, and the digits were decimal (0–9), represented by positions on toothed wheels rather than binary digits (“bits”). When one of the toothed wheels turned from nine to zero, it caused the next wheel to advance one position, carrying the digit. Like modern computers, the Difference Engine had storage—that is, a place where data could be held temporarily for later processing.

6 0
3 years ago
A(n) _____ allows a user to choose specific files to back up, regardless of whether or not the files have been changed.
Anna35 [415]
<span>A selective backup allows a user to choose specific files to back up, regardless of whether or not the files have been changed.</span>
7 0
3 years ago
One condition for deadlocks is the circular-wait condition. One way to ensure that this condition never holds is to impose a tot
Artyom0805 [142]
<h2>Dead lock is possible in Bank Transactions</h2>

Explanation:

Let us understand the term "Dead lock"

A deadlock is a situation where whole set of process is locked, since each of the process is waiting or holding the resource of another process. Each process will be interdependent and waiting for the same resource.

Deadlock is possible during bank transaction in the following situation:

A & B are two accounts where A tries to transfer funds to B and B tries to transfer fund to A.

When both tries to transfer funds at the same time, deadlock occurs.

A deadlock can be avoided by any one of the four methods.

They are: Mutual exclusion, No preemption, circular wait, hold and wait.

4 0
3 years ago
Read 2 more answers
Describe computer as a source of communication.​
Andreas93 [3]

Answer:

Explanation:

Computer communications describes a process in which two or more computers or devices transfer data, instructions, and information. ... A sending device that initiates an instruction to transmit data, instructions, or information. A communications device that connects the sending device to a communications channel.

4 0
3 years ago
Other questions:
  • The utilization of a subset of the performance equation as a performance metric is a pitfall. To illustrate this, assume the fol
    13·1 answer
  • How to find no of Distinct triangles in a polygon?
    10·1 answer
  • What does anyone who chooses to use speech recognition software need to do? Create a Guest Account.
    8·1 answer
  • What is the Internet?
    5·2 answers
  • What are your thoughts about this re-designed Logo? Is it good? Or is poorly designed? Explain your answer below.
    13·1 answer
  • Jobs with only 7 letters
    7·2 answers
  • Mingji is working to transfer photos from her digital camera to her computer. While
    11·1 answer
  • You want to make access to files easier for your users. Currently, files are stored on several NTFS volumes such as the C:, D:,
    14·1 answer
  • PLEASE SOMEONE PLEASE HELP ME OUT!!!!
    10·2 answers
  • What are the benefits of computer literacy?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!