Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Creating and modifying sets. The top 3 most popular male names of 2017 are Oliver, Declan, and Henry according to babynames.com. Write a program that
Creating and modifying sets. The top 3 most popular male names of 2017 are Oliver, Declan, and Henry according to babynames.com. 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. 370918.1946576.qx3zqy7
1 test passed All tests passed Run No solution code provided Testing with inputs: 'Oliver' 'Atlas' Output differs.
See highlights below.
Your output { 'Declan', 'Henry', 'Oliver' } Expected output { 'Atlas', 'Declan', 'Henry' }
Testing with inputs: 'Declan' 'Noah' Output differs.
See highlights below. Your output { 'Declan', 'Henry', 'Oliver' } Expected output { 'Henry', 'Noah', 'Oliver' }
I can't seem to get the right output for {'Henry', 'Noah', 'Oliver'}.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started