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
A hydraulic jump is induced in an 80 ft wide channel.The water depths on either side of the jump are 1 ft and 10 ft.Please calcu
krek1111 [17]

Answer:

a) 42.08 ft/sec

b) 3366.33 ft³/sec

c) 0.235

d) 18.225 ft

e) 3.80 ft

Explanation:

Given:

b = 80ft

y1 = 1 ft

y2 = 10ft

a) Let's take the formula:

\frac{y2}{y1} = \frac{1}{5} * \sqrt{1 + 8f^2 - 1}

10*2 = \sqrt{1 + 8f^2 - 1

1 + 8f² = (20+1)²

= 8f² = 440

f² = 55

f = 7.416

For velocity of the faster moving flow, we have :

\frac{V_1}{\sqrt{g*y_1}} = 7.416

V_1 = 7.416 *\sqrt{32.2*1}

V1 = 42.08 ft/sec

b) the flow rate will be calculated as

Q = VA

VA = V1 * b *y1

= 42.08 * 80 * 1

= 3366.66 ft³/sec

c) The Froude number of the sub-critical flow.

V2.A2 = 3366.66

Where A2 = 80ft * 10ft

Solving for V2, we have:

V_2 = \frac{3666.66}{80*10}

= 4.208 ft/sec

Froude number, F2 =

\frac{V_2}{g*y_2} = \frac{4.208}{32.2*10}

F2 = 0.235

d) El = \frac{(y_2 - y_1)^3}{4*y_1*y_2}

El = \frac{(10-1)^3}{4*1*10}

= \frac{9^3}{40}

= 18.225ft

e) for critical depth, we use :

y_c = [\frac{(\frac{3366.66}{80})^2}{32.2}]^1^/^3

= 3.80 ft

7 0
3 years ago
Read 2 more answers
C#: Arrays - Ask the user how many students names they want to store. You will create two parallel arrays (e.g. 2 arrays with th
zhenek [66]

Answer:

  1. using System;      
  2. public class Program
  3. {
  4. public static void Main()
  5. {
  6.  Console.WriteLine("Enter number of students: ");
  7.  int num = Convert.ToInt32(Console.ReadLine());
  8.  string [] firstName = new string[num];
  9.  string [] lastName = new string[num];
  10.  
  11.  for(int i=0 ; i < num; i++){
  12.   Console.WriteLine("Enter first name: ");
  13.   firstName[i] = Console.ReadLine();
  14.    
  15.   Console.WriteLine("Enter last name: ");
  16.   lastName[i] = Console.ReadLine();
  17.  }
  18.  
  19.  for(int j=0; j < num; j++){
  20.   Console.WriteLine(lastName[j] + "," + firstName[j]);
  21.  }
  22. }
  23. }

Explanation:

Firstly, prompt user to enter number of student to be stored (Line 6- 7). Next, create two array, firstName and lastName with num size (Line 8-9).

Create a for-loop to repeat for num times and prompt user to enter first name and last name and then store them in the firstName and lastName array, respectively (Line 11 - 17).

Create another for loop to traverse through the lastName and firstName array and display the last name and first name by following the format given in the question (Line 19 - 21).

4 0
3 years ago
How do you use the brakes in an airplane?
Paraphin [41]

Answer:

When a pilot pushes the top of the right pedal, it activates the brakes on the right main wheel/wheels, and when the pilot pushes the top of the left rudder pedal, it activates the brake on the left main wheel/wheels. The brakes work in a rather simple way: they convert the kinetic energy of motion into heat energy.

3 0
3 years ago
Linear dimensioning commands are used to dimension _____.
ehidna [41]

Answer:

Horitzontal and Vertical Lines

Explanation:

You can use this command to generate horizontal and vertical dimensions. Creating a linear dimension is easy. All you have to do is start the command, specify the two points between which you want the dimension to be drawn and pick a point to fix the position of the dimension line.

4 0
2 years ago
Water that has evaporated returns to earth as
denis23 [38]

Answer:

rain

Explanation:

evaoration causes clouds

clouds condense and rain

4 0
3 years ago
Read 2 more answers
Other questions:
  • To assist in completing this question, you may reference the Animated Technique Video - MALDI-TOF Mass Spectroscopy. Complete th
    9·1 answer
  • The angle of twist can be computed using the material’s shear modulus if and only if: (a)- The shear stress is still in the elas
    14·1 answer
  • A four-lane freeway (two lanes in each direction) is located on rolling terrain and has 12-ft lanes, no lateral obstructions wit
    14·1 answer
  • A six-lane divided highway (three lanes in each direction) is on rolling terrain with two access points per mile and has 10- ft
    7·1 answer
  • The<br> _______includes classes of laborers, such as general laborer, apprentice laborer and mason.
    9·1 answer
  • List a minimum of four reasons why you might be rejected for a job offer.
    10·1 answer
  • Market research is a good place to start the design process and usually involves asking questions about consumers.
    5·1 answer
  • Need help please????????!!!!!!
    5·1 answer
  • If we didn’t have the spark what could not happen?
    9·1 answer
  • Which type of artificial intelligence (ai) can repeatedly perform tasks of limited scope?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!