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 is the maximum number of 12-2 with ground nonmetallic-sheathed cables permitted in an 18-cubic-inch device box if two singl
Novosadov [1.4K]

Answer:i think it is 35

Explanation:

i just guessed sorry im only in 5th grade

8 0
3 years ago
Read 2 more answers
Pipe (2) is supported by a pin at bracket C and by tie rod (1). The structure supports a load P at pin B. Tie rod (1) has a diam
Galina-37 [17]

Answer:

P_max = 25204 N

Explanation:

Given:

- Rod 1 : Diameter D = 12 mm , stress_1 = 110 MPa

- Rod 2: OD = 48 mm , thickness t = 5 mm , stress_2 = 65 MPa

- x_1 = 3.5 mm ; x_2 = 2.1 m ; y_1 = 3.7 m

Find:

- Maximum Force P_max that this structure can support.

Solution:

- We will investigate the maximum load that each Rod can bear by computing the normal stress due to applied force and the geometry of the structure.

- The two components of force P normal to rods are:

               Rod 1 : P*cos(Q)  

               Rod 2: - P*sin(Q)

where Q: angle subtended between x_1 and Rod 1 @ A. Hence,

               Q = arctan ( y_1 / x_1)

               Q = arctan (3.7 / 2.1 ) = 60.422 degrees.

- The normal stress in each Rod due to normal force P are:

               Rod 1 : stress_1 = P*cos(Q)  / A_1

               Rod 2: stress_2 = - P*sin(Q)  / A_2

- The cross sectional Area of both rods are A_1 and A_2:

               A_1 = pi*D^2 / 4

               A_2 = pi*(OD^2 - ID^2) / 4

- The maximum force for the given allowable stresses are:

               Rod 1: P_max =  stress_1 * A_1 / cos(Q)

                          P_max = (110*10^6)*pi*0.012^2 / 4*cos(60.422)

                          P_max = 25203.61848 N

               Rod 2: P_max =  stress_2 * A_2 / sin(Q)

                          P_max = (65*10^6)*pi*(0.048^2 - 0.038^2) / 4*sin(60.422)

                          P_max = 50483.4 N

- The maximum force that the structure can with-stand is governed by the member of the structure that fails first. In our case Rod 1 with P_max = 25204 N.

             

8 0
3 years ago
11. Which of the following is the brake fluid most often used?
Olenka [21]
Dot 3 is mostly used in a lot of v4 and v6
4 0
3 years ago
Read 2 more answers
An array of electronic chips is mounted within a sealedrectangular enclosure, and colling is implemented by attaching analuminum
Licemer1 [7]

Answer:

Base temperature is 46.23 °C

Explanation:

I've attached explanations

6 0
3 years ago
The period of an 800 hertz sine wave is
sukhopar [10]

Explanation:

White Board Activity: Practice: A sound has a frequency of 800 Hz. What is the period of the wave? The wave repeats 800 times in 1 second and the period of the function is 1/800 or 0.00125.

3 0
3 years ago
Other questions:
  • A soil had a liquid limit of 44, a plastic limit of 21, and a shrinkage limit of 14. In the summer, the in situ water content wa
    14·1 answer
  • Make sure that the switch is on (if the drill is electric), the chuck key is not removed before you plug in the drill or turn it
    11·2 answers
  • Aerospace engineers who work for certain government agencies are often required to have security clearance. Explain two reasons
    9·1 answer
  • A 150-lbm astronaut took his bathroom scale (a spring scale) and a beam scale (compares masses) to the moon where the local grav
    13·1 answer
  • 1. How does manufacturing help strengthen<br> the economy?
    15·1 answer
  • The penalty for littering 15 lb or less is _____.<br> A. $25<br> B. $50<br> C. $100<br> D. $150
    14·1 answer
  • A. Derive linear density expressions for BCC [110] and [111] directions in terms of the atomic radius R.
    7·1 answer
  • Determine the magnitude and the location of the hydrostatic force on the 2m by 4 m vertical rectangular gate shown in Figure P3.
    12·1 answer
  • I will mark brainliest.
    6·2 answers
  • A heating torch is usually referred to as what?<br><br> Stick<br> Flower<br> Rose-bud<br> Lighter
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!