subject

Creating and modifying sets. The top 3 most popular male names of 2017 are Oliver, Declan, and Henry according to babynames. Write a program that modifies the 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.
1 male_names = { 'oliver', 'Declan', 'Henry' }
2 name_to_remove = input()
3 name_to_add = input()
4 male_names = { 'oliver', 'Declan', 'Henry' }
5
6 #The statement to remove 'oliver' from the set.
7
8 male_names. remove('oliver')
9
10 #Add the name 'Atlas' in the set ,ale_names.
11
12 male_names. add('Atlas')
13
14 print(male_names)
Testing with inputs: 'Oliver''Atlas'
Your output { 'Atlas', 'Declan', 'Henry' }
Testing with inputs: 'Declan' 'Noah'
Output differs. See highlights below.
Your output { 'Atlas', 'Declan', 'Henry' }
Expected output { 'Henry', 'Noah', 'Oliver' }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
When building customer relationships through email what should you not do? question 2 options: utilize proper grammar, spelling, and punctuation type in all capital letters use hyperlinks rather than attachments respond to all emails within 24 hours
Answers: 1
question
Computers and Technology, 24.06.2019 15:20
Local area networks use many of the same network technologies and the internet, only on a smaller scale. devices that access lans are equipped with a network interface that contains circuitry for wireless or wired connections. devices also have a physical address, in addition to the ip addresses acquired from a dhcp server. the most popular wired technology is . the most popular wireless technology is , which can be configured as a(n) or star topology. setting up a lan and configuring its router is fairly easy. the first step is to change the standard to one that is secure. next, create a(n) that uniquely identifies the network by name. it is also important to activate wireless to prevent wireless signals from being intercepted during transmission. a limited-access network can be created for visitors to use. by activating , the router will be able to assign ip addresses to each device that joins the network. to connect to a secure lan that is protected by encryption, an encryption , or password, is required. lans can be used to access data collected by iot devices and the networks that tie these devices together. technologies such as rfid, nfc, bluetooth smart, zigbee, and z-wave offer -power links, essential for battery-powered devices that can’t expend excess amounts of energy transmitting data.
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
Radar devices are used by law enforcement to be sure that individuals are driving safely. they tell the officer how fast the vehicle is traveling at that specific moment in time. the radar device determines the vehicle's a. instantaneous speed. b. acceleration. c. maximum velocity. d. average speed.
Answers: 1
You know the right answer?
Creating and modifying sets. The top 3 most popular male names of 2017 are Oliver, Declan, and Henr...
Questions
question
Mathematics, 01.04.2020 19:52
question
Mathematics, 01.04.2020 19:52
question
Mathematics, 01.04.2020 19:52
question
Mathematics, 01.04.2020 19:52
Questions on the website: 13722367