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
Tech A says that in some cases, the electronic brake control module can be programmed with a new tire size to restore proper ele
Vlad [161]

Answer:

Both Techs A and B

Explanation:

Electronic braking systems are controlled by the electronic brake control module. It is a microprocessor that processes information from wheel-speed sensors and the hydraulic brake system to determine when to release braking pressure at a wheel that's about to lock up and start skidding  and activates the anti lock braking system or traction system when it detects it is necessary.

Some electronic brake control modules can be programmed to the size of the vehicle's new tires to restore proper electronic brake control performance. While others may require replacing the module to match the module's programming to the installed tire size. So, both technicians A and B are correct.

3 0
3 years ago
"Mass burn technology uses unprocessed municipal solid waste to generate heat which is used to produce electricity."
Flura [38]

Answer:

True

Explanation:

Mass burn technology is a type of waste-to-energy technology commonly used in the mass-burn system, where unprocessed municipal solid waste is burned in a large incinerator with a boiler, to  generate heat used in the production of electricity.

6 0
3 years ago
Read 2 more answers
A thick oak wall initially at 25°C is suddenly exposed to gases for which T =800°C and h =20 W/m2.K. Answer the following questi
Schach [20]

Answer:

a) What is the surface temperature, in °C, after 400 s?

   T (0,400 sec) = 800°C

b) Yes, the surface temperature is greater than the ignition temperature of oak (400°C) after 400 s

c) What is the temperature, in °C, 1 mm from the surface after 400 s?

   T (1 mm, 400 sec) = 798.35°C

Explanation:

oak initial Temperature = 25°C = 298 K

oak exposed to gas of temp = 800°C = 1073 K

h = 20 W/m².K

From the book, Oak properties are e=545kg/m³   k=0.19w/m.k   Cp=2385J/kg.k

Assume: Volume = 1 m³, and from energy balance the heat transfer is an unsteady state.

From energy balance: \frac{T - T_{\infty}}{T_i - T_{\infty}} = Exp (\frac{-hA}{evCp})t

Initial temperature wall = T_i

Surface temperature = T

Gas exposed temperature = T_{\infty}

6 0
4 years ago
You have a motor such that if you give it 12 Volt, it will eventually reach a steady state speed of 200 rad/s. If it starts from
Aleksandr [31]

Answer:

a) \frac{Ws}{Es}  = \frac{200}{1+1.2s}

b) attached below

c) type zero system

d) k > \frac{g}{200}

e) The gain K increases above % error as the  steady state speed increases

Explanation:

Given data:

Motor voltage  = 12 v

steady state speed = 200 rad/s

time taken to reach 63.2% = 1.2 seconds

<u>a) The transfer function of the motor from voltage to speed</u>

let ; \frac{K1}{1+St} be the transfer function of a motor

when i/p = 12v then steady state speed ( k1 ) = 200 rad/s , St ( time constant ) = 1.2 sec

hence the transfer function of the motor from voltage to speed

= \frac{Ws}{Es}  = \frac{200}{1+1.2s}

<u>b) draw the block diagram of the system with plant controller and the feedback path </u>

attached below is the remaining part of the detailed solution

c) The system is a type-zero system because the pole at the origin is zero

d) ) k > \frac{g}{200}

7 0
3 years ago
What issues does society try to forget in order to not have to deal with them ?
velikii [3]

Answer: Homelessness, Drug addiction, Mental Illness, Climate change.

Explanation:

Society would rather be ignorant to/ ignore all of these realities so they do not have to stop specific behaviors or actually acknowledge other people and help. Sometimes people are so stressed out about their own lives, they can not bare another persons issues. People are ignorant to climate change because correcting it requires massive changes and society is selfish and unwilling to change.

6 0
3 years ago
Other questions:
  • Single point cutting tool removes material from a rotating work piece to generate a cylinder is called • Facing Tuming • Both 1
    6·1 answer
  • Yasir is trying to build an energy-efficient wall and deciding what materials to use. How can he calculate the thermal resistanc
    6·1 answer
  • A water jet strikes normal to a fixed plate. If diameter of the outlet of the nozzle is 8 cm,and velocity of water at the outlet
    11·1 answer
  • If you add 10 J of heat to a system so that the final temperature of the system is 200K, what is the change in entropy of the sy
    9·1 answer
  • : A cyclical load of 1500 lb is to be exerted at the end of a 10 in. long aluminium beam (see Figure below). The bar must surviv
    6·1 answer
  • Who wanna learn C# for free tell me​
    10·1 answer
  • Could I please get help with this​
    11·1 answer
  • 1. A hydro facility operates with an elevation difference of 50 m and a flow rate of 500 m3/s. If the rotational speed is 90 RPM
    12·1 answer
  • 19. A circuit contains four 100 S2 resistors connected in series. If you test the circuit with a digital VOM,
    9·1 answer
  • Write a program that takes three numbers as input from the user, and prints the largest.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!