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
Match each command group under Picture Tools to the appropriate tasks.
FrozenT [24]

Answer:

look at the attachment for correct answers.

6 0
3 years ago
1.
slamgirl [31]
1. I believe it this, they way the question is phrased it seems like a personal opinion. But if we're being logical about this, no one likes background noise. So,yes, it's important. 
2. Yes, when you record something you don't want additional sound that has nothing to do with what you're recording. 
3.Yes, your main task is to be focused on what you're doing on the computer. You don't want to be distracted by unnecessary distractions. 
8 0
3 years ago
Have you been tempted to do something online that you wouldn't do if<br> people knew it was you?
Aleksandr-060686 [28]

Answer

I don't know tbh, Maybe once or twice here or there.

Explanation:

6 0
3 years ago
How artifical intelligence will have more effect on our day to day life ? ​
astraxan [27]

Answer:

Artificial intelligence can dramatically improve the efficiencies of our workplaces and can augment the work humans can do. When AI takes over repetitive or dangerous tasks, it frees up the human workforce to do work they are better equipped for—tasks that involve creativity and empathy among others.

3 0
2 years ago
Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n
joja [24]

Answer:

A stub method or merely a stub in software development is a code piece that performs various other programming functionality. It can copy the existing code behavior like a procedure on a remote machine like methods are quite frequently known as mocks or for a while working for a code that has not yet been developed.

Please check the explanation for more details.

Explanation:

A method stub in this intelligence is a method with no factual material, i.e. it's not deed what it is intended to do. Your getUserNum() method must return a user's unique ID, but in its place, you're indispensable a stub that merely returns -1 on every request.

Through the main method, you should define these methods:

Num1=getUserNum();

Num2=getUserNum();

avgResult = computeAvg(Num1, Num2);

Hence, define them. And below is how the above stub function should be like:

public static int getUserNum(){

System.out.println("FIXMR:Finish getUserNum()");

return -1;

And the whole program should look like:

import java.util.Scanner;

public class Main {

public static int getUserNum ()

{

System.out.println("FIXME: Finish getUserNum()");

return -1;

}

public static int computeAvg(int Num1, int Num2)

{

int avgResult = (Num1 + Num2)/2;

System.out.println("FIXME: Finish computeAvg()"); return -1;

}

public static void main(String[] args)

{

int Num1 = 0;

int Num2 = 0;

int avgResult = 0;

Num1 = getUserNum(); Num2 = getUserNum();

avgResult = computeAvg(Num1, Num2);

System.out.println("Avg: " + avgResult);

return;

}

}

3 0
3 years ago
Other questions:
  • Which of the following represent typical account fees?
    7·1 answer
  • If I were to install python in kali linux on a Acer 11 Chromebook and C730 would I be able to hack python with it since I have n
    15·1 answer
  • Consider the following two implementations of the same algorithm, each written in a different language.
    11·1 answer
  • Most microsoft windows fatal errors (blue scree of death) are caused by:
    6·1 answer
  • In an internal combustion engine, the gasoline is combined with _______.
    6·1 answer
  • Microsoft acknowledged that if you type a res:// url (a microsoft-devised type of url) which is longer than ____ characters in i
    9·1 answer
  • Can I get some help thank you
    8·2 answers
  • Write the following program: Use struct data type to store information about courses. Every course is characterized by the follo
    6·1 answer
  • 04. Suppose a computer program needs to sort a list of student records in ascending order
    7·1 answer
  • While storms could be a cause, power______ are more likely to be caused by disturbances from high-demand equipment in a home or
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!