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
What car has autopilot?
s344n2d4d5 [400]

tesla lol how did you not know that?

6 0
2 years ago
Read 2 more answers
Expert Review is done by end users.
Free_Kalibri [48]

Answer:nononononono

Explanation:

6 0
3 years ago
Calculate the reactions at 4 ends (supports) of this bookshelf. Assume that the weight of each book is approximately 1 lb. The w
hoa [83]

Answer:

R = 4.75 lb  (↑)

Explanation:

Number of books = n = 19

Weight of each book = W = 1 lb

Length of the bookshelf = L = 40 inches

We can get the value of the distributed load as follows

q = n*W/L = 19*1 lb/ 40 inches = 0.475 lb/in

then the reactions at 4 ends (supports) of the bookshelf are

R = (q/2)/2 = 4.75 lb

We can see the bookshelf in the pic.

8 0
3 years ago
A hemispherical shell with an external diameter of 500 mm and a thickness of 20 mm is going to be made by casting, located entir
Olenka [21]

Solution :

Given :

External diameter of the hemispherical shell, D = 500 mm

Thickness, t = 20 mm

Internal diameter, d = D - 2t

                                 = 500 - 2(20)

                                 = 460 mm

So, internal radius, r = 230 mm

                                 = 0.23 m

Density of molten metal, ρ = $7.2 \ g/cm^3$

                                                  = $7200 \ kg/m^3$

The height of pouring cavity above parting surface is h = 300 mm

                                                                                                  = 0.3 m

So, the metallostatic thrust on the upper mold at the end of casting is :

$F=\rho g A h$

Area, A $=2 \pi r^2$

            $=2 \pi (0.23)^2$

            $=0.3324 \ m^2$

$F=\rho g A h$

   $=7200 \times 9.81 \times 0.3324 \times 0.3$

     = 7043.42 N

3 0
2 years ago
For some metal alloy, the following engineering stresses produce the corresponding engineering plastic strains prior to necking.
kirza4 [7]

Answer:

203.0160

Explanation:

Because you add then subtract then multiply buy 7 the subtract then divide then you add that to the other numbers you got than boom

7 0
2 years ago
Other questions:
  • For a heat pump, COP&lt;1. a) True b) False
    11·1 answer
  • A 356 cast aluminum test bar is tested in tension. The initial gage length as marked on the sample is 50mm and the initial diame
    9·1 answer
  • For each of the following stacking sequences found in FCC metals, cite the type of planar defect that exists:
    7·1 answer
  • The working section of a transonic wind tunnel has a cross-sectional area 0.5 m2. Upstream, where the cross-section area is 2 m2
    10·1 answer
  • Design a posttest-only experiment that would test each of the following causal claims. For each one, identify the study’s indepe
    13·1 answer
  • Write a statement that increases numPeople by 5. Ex: If numPeople is initially 10, the output is: There are 15 people.
    11·1 answer
  • The truck travels in a circular path having a radius of 50 m at a speed of v = 4 m&gt;s. For a short distance from s = 0, its sp
    11·1 answer
  • Importance of civil engineering in nepal?​
    10·1 answer
  • Which design activity is part of the design for manufacturability (DFM) methodology?
    10·1 answer
  • What are the specifications state that all work shall be done?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!