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
Thoughts about drinking and driving
poizon [28]

Answer: it’s very bad behavior and can be dangerous

Explanation:

8 0
3 years ago
Read 2 more answers
g (d) Usually, in the case of two finite-duration signals like in parts (a) and (b), the convolution integralmust be evaluated i
Bas_tet [7]

you face is A certain vehicle loses 3.5% of its value each year. If the vehicle has an initial value of $11,168, construct a model that represents the value of the vehicle after a certain number of years. Use your model to compute the value of the vehicle at the end of 6 years.

3 0
3 years ago
Air at a pressure of 6000 N/m^2 and a temperature of 300C flows with a velocity of 10 m/sec over a flat plate of length 0.5 m. E
White raven [17]

Answer:

Q=hA(T_{w}-T_{inf})=16.97*0.5(27-300)=-2316.4J

Explanation:

To solve this problem we use the expression for the temperature film

T_{f}=\frac{T_{\inf}+T_{w}}{2}=\frac{300+27}{2}=163.5

Then, we have to compute the Reynolds number

Re=\frac{uL}{v}=\frac{10\frac{m}{s}*0.5m}{16.96*10^{-6}\rfac{m^{2}}{s}}=2.94*10^{5}

Re<5*10^{5}, hence, this case if about a laminar flow.

Then, we compute the Nusselt number

Nu_{x}=0.332(Re)^{\frac{1}{2}}(Pr)^{\frac{1}{3}}=0.332(2.94*10^{5})^{\frac{1}{2}}(0.699)^{\frac{1}{3}}=159.77

but we also now that

Nu_{x}=\frac{h_{x}L}{k}\\h_{x}=\frac{Nu_{x}k}{L}=\frac{159.77*26.56*10^{-3}}{0.5}=8.48\\

but the average heat transfer coefficient is h=2hx

h=2(8.48)=16.97W/m^{2}K

Finally we have that the heat transfer is

Q=hA(T_{w}-T_{inf})=16.97*0.5(27-300)=-2316.4J

In this solution we took values for water properties of

v=16.96*10^{-6}m^{2}s

Pr=0.699

k=26.56*10^{-3}W/mK

A=1*0.5m^{2}

I hope this is useful for you

regards

8 0
3 years ago
A 0.19-m3 rigid tank equipped with a pressure regulator contains steam at 2 MPa and 300°C. The steam in the tank is now heated.
AVprozaik [17]

Answer:

576.21kJ

Explanation:

#We know that:

The balance mass m_{in}+m_{out}=\bigtriangleup m_{system}

so, m_e=m_1-m_2

Energy \ Balance\\E_{in}-E_{out}=\bigtriangleup E_{system}\\\\\therefore Q_i_n+m_eh_e=m_2u_2-m_1u_1

#Also, given the properties of water as;

(P_1=2Mpa,T_1=300\textdegree C)->v_1=0.12551m^3/kg,u_1=2773.2kJ/kg->h_1=3024.2kJ/kg\\\\(P_2=2Mpa,T_1=500\textdegree C)->v_2=0.17568m^3/kg,u_1=3116.9kJ/kg->h_1=3468.3kJ/kg

#We assume constant properties for the steam at average temperatures:h_e=\approx(h_1+h_2)/2

#Replace known values in the equation above;h_e=(3024.2+3468.3)/2=3246.25kJ/kg\\\\m_1=V_1/v_1=0.19m^3/(0.12551m^3/kg)=1.5138kg\\\\m_2=V_2/v_2=0.19m^3/(0.17568m^3/kg)=1.0815kg

#Using the mass and energy balance relations;

m_e=m_1-m_2\\\\m_e=1.5138-1.0815\\\\m_e=0.4323kg

#We have Q_i_n+m_eh_e=m_2u_2-m_1u_1: we replace the known values in the equation as;

Q_i_n+m_eh_e=m_2u_2-m_1u_1\\\\Q_i_n=0.4323kg\times3246.2kJ/kg+1.0815kg\times3116.9-1.5138kg\times2773.2kJ/kg\\\\Q_i_n=573.21kJ

#Hence,the amount of heat transferred when the steam temperature reaches 500°C is 576.21kJ

5 0
3 years ago
2. What is the Function of the Camshaft in an Internal Combustion Engine?
mamaluj [8]

Answer:

camshaft, in internal-combustion engines, rotating shaft with attached disks of irregular shape (the cams), which actuate the intake and exhaust valves of the cylinders.

Explanation:

I'm taking an engineering/tech class. I hope this helps! :)

8 0
3 years ago
Other questions:
  • Kirchoff's Law states that, by the time current has returned to its source, all
    13·2 answers
  • How does it produce a 3D component?
    8·1 answer
  • A certain working substance receives 100 Btu reversibly as heat at a temperature of 1000℉ from an energy source at 3600°R. Refer
    13·1 answer
  • The motion of a particle is defined by the relation x = t3 – 6t2 + 9t + 3, where x and t are expressed in feet and seconds, resp
    12·1 answer
  • Which one of the following activities is not exempt from licensure pursuant to Chapter 471, F.S.? A person practicing engineerin
    5·1 answer
  • For a steel alloy it has been determined that a carburizing heat treatment of 14 h duration at 809°C will raise the carbon conce
    13·1 answer
  • Ratio equivalent to 12 red beans to 5 total beans
    15·1 answer
  • Convert 103.69 kN to TN.
    14·1 answer
  • Who does each person work for? Monica works for a power company, Travis works for a utilities company, and Maggie is self-employ
    15·2 answers
  • Explain the use of a vacuum gauge.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!