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
katen-ka-za [31]
3 years ago
6

The top 3 most popular male names of 2017 are Oliver, Declan, and Henry according to babynames. Write a program that modifies th

e male_names set by removing a name and adding a different name. Sample output with inputs: 'Oliver' 'Atlas' { 'Atlas', 'Declan', 'Henry' } NOTE: Because sets are unordered, the order in which the names in male_names appear may differ from above.
Engineering
1 answer:
Flura [38]3 years ago
7 0

Answer:

The code is given below in Python with appropriate comments

Explanation:

# convert list to set

male_names = set(['Oliver','Declan','Henry'])

# get remove and add name from user

remove_name = input("Enter remove name: ")

add_name = input("Enter add name: ")

# remove name from set

male_names.remove(remove_name)

# add new name ij set

male_names.add(add_name)

# sort the set

a = sorted(male_names)

# print the set

print(a)

You might be interested in
What do you mean by decentralization??​
Marina CMI [18]

Explanation:

Decentralization—the transfer of authority and responsibility for public functions from the central government to subordinate or quasi-independent government organizations and/or the private sector—is a complex multifaceted concept.

5 0
2 years ago
Read 2 more answers
The thermal energy is carried by electromagnetic waves
Dominik [7]
The answer is Radiation
8 0
3 years ago
6) Describe the differences between the troposphere and stratosphere.
vodka [1.7K]

Answer:

frejfru8758u37

Explanation:

i need points

8 0
3 years ago
4.10.1: Simon says. "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user mu
AleksandrR [38]

Answer:

for  i  in range(0,10):

   if SimonPattern[i] == UserPattern[i]:

       score = score + 1

       i = i + 1

   else:

       break

if i == 9:

   score = score + 1    

print("Total Score: {}".format(score))

Explanation:

This for loop was made using Python. Full code attached.

  • For loop requires a range of numbers to define the end points. For this Simon Says game, we are talking about 10 characters, so that must be the range for the for loop: from 0 to 10.
  • Conditional if  tests if Simon pattern matches User's one characheter by one and add point for each match.
  • Break statement is ready to escape the for loop at first mismatch.
  • As we are starting from index 0, if the users matched all the characters correctly, then we need to add 1, otherwise the maximun score would be 9 and it should be 10.
Download txt
5 0
3 years ago
The principal value of a Pareto diagram is as a
vlada-n [284]

The Pareto principle is that most things in our life are not commonly distributed.

<u>Explanation:</u>

Pareto chart shows that most of the things which we have in our life and the resources in our life are not equally distributed. The ratio is not always 50:50 according to this principle.

The most important use of a Pareto diagram is to show the most important factor among the set of factors that have been shown. Along with that it also shows the sources which lead to the common defects in the system and tries to solve those defects which occur most often.

4 0
4 years ago
Other questions:
  • Describe three advantages and three disadvantages of JIT?
    12·1 answer
  • For some transformation having kinetics that obey the Avrami equation , the parameter n is known to have a value of 1.1. If, aft
    6·1 answer
  • An air-standard cycle with constant specific heats at room temperature is executed in a closed system with 0.003 kg of air and c
    15·1 answer
  • An air conditioner using refrigerant-134a as the working fluid and operating on the ideal vapor-compression refrigeration cycle
    7·2 answers
  • A contractor needs to excavate 50,000 yd3 of silty clay and haul it with Caterpillar 69C dump trucks. Each truck can carry 30.9
    13·1 answer
  • A 3-phase, 50 Hz, 110 KV overhead line has conductors placed in a horizontal plane 3 m apart. Conductor diameter is 2.5 cm. If t
    6·1 answer
  • Often an attacker crafts e-mail attacks containing malware designed to take advantage of the curiosity or even greed of the reci
    14·1 answer
  • The air standard efficiency ofan Otto cycle compared to diesel cycle for thie given compression ratio is: (a) same (b) less (c)
    12·1 answer
  • Can someone help plz?!?
    5·2 answers
  • CNG is a readily available alternative to _________.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!