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
mamaluj [8]
3 years ago
12

Implement a function called myFilter that does the following: Takes a sequence of integers with values from 0 to 100 Remove all

multiples of 6 less than 42 Then square each number Finally, remove any resulting integer that is odd public class Problem2 { public static IEnumerable myFilter(IEnumerable input) { } } static void Main(string[] args)
Engineering
1 answer:
goldenfox [79]3 years ago
6 0

Answer:

using System;

using System.Collections.Generic;

using System.Linq;

public class Problem1 {

public static IEnumerable < int > myFilter(IEnumerable < int > input) {

return input.Where((val, index) => {

//First remove all multiples of 6 less than 42

return !(val % 6 == 0 && val < 42);

}).Select((val, index) => {

//Then square each number

return val * val;

}).Where((val, index) => {

// Finally, remove any resulting integer that is odd

return !(val % 1 == 0);

});

}

public static void Main(string[] args) {

Random rnd = new Random(5);

//Takes a sequence of integers with values from 0 to 100

var listForProblem = Enumerable.Range(1, 100).Select(i => rnd.Next() % 101);

var answer = Problem1.myFilter(listForProblem);

foreach(int i in answer) {

Console.WriteLine(i);

}

}

}

Explanation:

The Problem 1 solution is explanatory enough.

Your problem 2 question is lacking details. However, i have written a code that sorts it.

You might be interested in
A sleeve made of SAE 4150 annealed steel has a nominal inside diameter of 3.0 inches and an outside diameter of 4.0 inches. It i
irga5000 [103]

Answer:

Class of fit:

Interference (Medium Drive Force Fits constitute a special type of Interference Fits and these are the tightest fits where accuracy is important).

Here minimum shaft diameter will be greater than the maximum hole diameter.

Medium Drive Force Fits are FN 2 Fits.

As per standard ANSI B4.1 :

Desired Tolerance: FN 2

Tolerance TZone: H7S6

Max Shaft Diameter: 3.0029

Min Shaft Diameter: 3.0022

Max Hole Diameter:3.0012

Min Hole Diameter: 3.0000

Max Interference: 0.0029

Min Interference: 0.0010

Stress in the shaft and sleeve can be considered as the compressive stress which can be determined using load/interference area.

Design is acceptable If compressive stress induced due to selected dimensions and load is less than compressive strength of the material.

Explanation:

4 0
3 years ago
Read 2 more answers
A solid cylindrical workpiece made of 304 stainless steel is 150 mm in diameter and 100 mm is high. It is reduced in height by 5
goblinko [34]

Answer:

45.3 MN

Explanation:

The forging force at the end of the stroke is given by

F = Y.π.r².[1 + (2μr/3h)]

The final height, h is given as h = 100/2

h = 50 mm

Next, we find the final radius by applying the volume constancy law

volumes before deformation = volumes after deformation

π * 75² * 2 * 100 = π * r² * 2 * 50

75² * 2 = r²

r² = 11250

r = √11250

r = 106 mm

E = In(100/50)

E = 0.69

From the graph flow, we find that Y = 1000 MPa, and thus, we apply the formula

F = Y.π.r².[1 + (2μr/3h)]

F = 1000 * 3.142 * 0.106² * [1 + (2 * 0.2 * 0.106/ 3 * 0.05)]

F = 35.3 * [1 + 0.2826]

F = 35.3 * 1.2826

F = 45.3 MN

7 0
3 years ago
Wastewater flows into a _________ once it is released into a floor drain.
vodomira [7]

Answer:

a

Explanation:

5 0
3 years ago
Calculate the wire pressure for a round copper bar with an original cross-sectional area of 12.56 mm2 to a 30% reduction of area
dybincka [34]

Answer:153.76 MPa

Explanation:

Initial Area\left ( A_0\right )=12.56 mm^2

Final Area\left ( A_f\right )=0.7\times 12.56 mm^2=8.792 mm^2

Die angle=30^{\circ}

\alpha =\frac{30}{2}=15^{\circ}

\mu =0.08

Yield stress\left ( \sigma _y \right )=350 MPa

B=\mu cot\left ( \aplha\right )=0.2985

\sigma _{pressure}=\sigma _y\left [\frac{1+B}{B}\right ]\left [ 1-\frac{A_f}{A_0}\right ]^B

\sigma _{pressure}=350\left [\frac{1+0.2985}{0.2985}\right ]\left [ 1-\frac{8.792}{12.56}\right ]^{0.2985}

\sigma _{pressure}=153.76 MPa

8 0
3 years ago
What is the formula for measuring the speed of an object
STALIN [3.7K]
S= d/t
Speed= distance/time
8 0
3 years ago
Other questions:
  • 12. Dies are turned using a special tool called a/an
    10·1 answer
  • How should employees talk to clients)
    9·1 answer
  • You are considering building a residential wind power system to produce 6,000 kWh of electricity each year. The installed cost o
    15·1 answer
  • Earth whose in situ weight is 105lb/cf and whose compacted weight is 122 lb/cf is placed in a fill at the rate of 260 cy/hr, mea
    14·1 answer
  • A 16-lb solid square wooden panel is suspended from a pin support at A and is initially at rest. A 4-lb metal sphere is shot at
    8·1 answer
  • A saturated 1.5 ft3 clay sample has a natural water content of 25%, shrinkage limit (SL) of 12% and a specific gravity (GS) of 2
    11·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    11·2 answers
  • What is the reading of this Dial Caliper?
    9·1 answer
  • An aluminum bar 125 mm long with a square cross section 16 mm on an edge is pulled in tension with a load of 66,700 N and experi
    14·1 answer
  • Where do you prefer to live?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!