Your program will be a line editor. A line editor is an editor where all operations are performed by entering commands at the command line. Commands include displaying lines, inserting text, editing lines, cutting and pasting text, loading and saving files. For example, a session where the user enters three lines of text and saves them as a new file may appear as:

Answers

Answer 1

Answer:

Java program given below

Explanation:

import java.util.*;

import java.io.*;

public class Lineeditor

{

private static Node head;

 

class Node

{

 int data;

 Node next;

 public Node()

 {data = 0; next = null;}

 public Node(int x, Node n)

 {data = x; next =n;}

}

 

public void Displaylist(Node q)

 {if (q != null)

       {  

        System.out.println(q.data);

         Displaylist(q.next);

       }

 }

 

public void Buildlist()

  {Node q = new Node(0,null);

       head = q;

       String oneLine;

       try{BufferedReader indata = new

                 BufferedReader(new InputStreamReader(System.in)); // read data from terminals

                       System.out.println("Please enter a command or a line of text: ");  

          oneLine = indata.readLine();   // always need the following two lines to read data

         head.data = Integer.parseInt(oneLine);

         for (int i=1; i<=head.data; i++)

         {System.out.println("Please enter another command or a new line of text:");

               oneLine = indata.readLine();

               int num = Integer.parseInt(oneLine);

               Node p = new Node(num,null);

               q.next = p;

               q = p;}

       }catch(Exception e)

       { System.out.println("Error --" + e.toString());}

 }

public static void main(String[] args)

{Lineeditor mylist = new Lineeditor();

 mylist.Buildlist();

 mylist.Displaylist(head);

}

}


Related Questions

A bridge hand consists of 13 cards. One way to evaluate a hand is to calculate the total high point count (HPC) where an ace is worth four points, a king is worth three points, a

Answers

Answer: Let us use the pickled file - DeckOfCardsList.dat.

Explanation: So that our possible outcome becomes

7♥, A♦, Q♠, 4♣, 8♠, 8♥, K♠, 2♦, 10♦, 9♦, K♥, Q♦, Q♣

HPC (High Point Count) = 16  

Air at 27oC and 50% relative humidity is cooled in a sensible cooling process to 18oC. The air is then heated to 45oC in a sensible heating process. Finally, the air experiences an adiabatic saturation process that increases the relative humidity back to 50%. Find the specific energy that is removed when the air is cooled to 18°C.

Answers

Answer:

[tex]q_{out} = 9.25\,\frac{kJ}{kg}[/tex]

Explanation:

First, it is required to find the absolute humidity of air at initial state:

[tex]\omega = \frac{0.622\cdot \phi \cdot P_{g}}{P-\phi \cdot P_{g}}[/tex]

The saturation pressure at [tex]T = 27^{\textdegree}C[/tex] is:

[tex]P_{g} = 3.601\,kPa[/tex]

Then,

[tex]\omega = \frac{0.622\cdot (0.5)\cdot (3.601\,kPa)}{101.325\,kPa-(0.5)\cdot (3.601\,kPa)}[/tex]

[tex]\omega = 0.0113\,\frac{kg\,H_{2}O}{kg\,air}[/tex]

A simple cooling process implies a cooling process with constant absolute humidity. The specific entalphies for humid air are:

Initial state:

[tex]h_{1} = (1.005\,\frac{kJ}{kg\cdot ^{\textdegree}C})\cdot (27^{\textdegree}C)+(0.0113)\cdot (2551.96\,\frac{kJ}{kg} )[/tex]

[tex]h_{1} = 55.972\,\frac{kJ}{kg}[/tex]

Final state:

[tex]h_{2} = (1.005\,\frac{kJ}{kg\cdot ^{\textdegree}C})\cdot (18^{\textdegree}C)+(0.0113)\cdot (2533.76\,\frac{kJ}{kg} )[/tex]

[tex]h_{2} = 46.722\,\frac{kJ}{kg}[/tex]

The specific energy that is removed is:

[tex]q_{out}= h_{1} - h_{2}[/tex]

[tex]q_{out} = 9.25\,\frac{kJ}{kg}[/tex]

What does the following program segment do? Declare Count As Integer Declare Sum As Integer Set Sum = 0 For (Count = 1; Count < 50; Count++) Set Sum = Sum + Count End For

Answers

1225

Explanation:

This segment helps initialize sum as 0. The for loop is used to increment with every execution and it is added to the sum. The loop runs 49 times and every time the count is added to the sum. In short it is the sum of first 49 natural numbers i.e 1+2+3+......+49.

With reference to the NSPE Code of Ethics, which one of the following statements is true regarding the ethical obligations of the engineers involved in the VW Emissions Cheating Scandal.

a. The VW engineers involved conducted themselves honorably, responsibly, ethically, and lawfully so as to enhance the honor, reputation, and usefulness of the profession.
b. As faithful agents and trustees of Volkswagen the engineers involved could not ethically report the emissions cheating violations to public authorities.
c. The VW engineers involved were ethically obligated to hold paramount the health, welfare and safety of the public even if their supervisors directed them to implement software and hardware that enabled cheating on the emissions testing software.
d. The VW engineers involved were not ethically obligated to report to their supervisors and to upper management the emissions cheating violations being implemented in the control system hardware and software.

Answers

Answer: c. The VW engineers involved were ethically obligated to hold paramount the health, welfare and safety of the public even if their supervisors directed them to implement software and hardware that enabled cheating on the emissions testing software.

Explanation: The National Society of professional Engineers, NSPE define the code of ethics which must guide engineers in their duty. These codes act as principles of personal conduct, towards the public and their employers.  

One of the areas covered by these codes is overriding importance of the safety and health of the public to any other factor. In addition, engineers are to avoid deception and maintain the reputation of their profession. These cannot be sacrificed for the financial gain of their employers or explained away by saying they are following the direction of their employers. While they have certain responsibilities to their employers, the health welfare and safety of the public is more important.  

The portable lighting equipment for a mine is located 100 meters from its dc supply source. The mine lights use a total of 5 kW and operate at 120 V dc. Determine the required cross-sectional area of the copper wires used to connect the source to the mine lights if we require that the power lost in the copper wires be less than or equal to 5 percent of the power required by the mine lights.

Answers

Final answer:

To calculate the required cross-sectional area of copper wires needed to connect the DC supply source to the mine lights with less than 5% power loss, calculate the permissible power loss, and then use the relationship between power loss, current, and wire resistance. Considering the resistivity of copper and the round trip length of the wire, the formula A = ρL/(δP/I²) determines the necessary wire thickness.

Explanation:

To determine the required cross-sectional area of copper wires for the lighting equipment, we need to ensure the power loss (δP) is no more than 5% of the lights' power usage (P), which is 5 kW (5000 W). As the power loss in wires is given by δP = I²R, where I is the current and R is the resistance of the wire, we must first calculate the current using P = IV, giving I = P/V = 5000W/120V = 41.67 A. The power loss allowed is thus 5% of 5000 W, equating to 250 W. Given δP, we can find R using δP = I²R, which gives R = δP/I².

The resistance of a copper wire is also given by R = ρL/A, where ρ is the resistivity of copper (1.68 x 10^-8 Ωm), L is the length of the wire (200 meters round trip), and A is the cross-sectional area we need to find. Equating the two expressions for R and solving for A gives A = ρL/(δP/I²). Substituting the given and calculated values yields the required cross-sectional area. Finally, as resistance depends on the entire length of the circuit, remember to double the distance to account for both the outgoing and return paths.

In the casting of steel under certain mold conditions, the mold constant in Chvorinov's Rule is known to be 4.0 min/cm2, based on previous experience. The casting is a flat plate whose length = 35 cm, width = 10 cm, and thickness = 15 mm. Determine how long it will take for the casting to solidify.

Answers

Answer:

it will take for the casting to solidify 2.55 min

Explanation:

given data

mold constant = 4 min/cm²

length = 35 cm

width = 10 cm

thickness = 15 mm

solution

we use here Chvorinov's Rule that is

Chvorinov's Rule = mold constant × [tex](\frac{V}{A})^{1.9}[/tex]   ..............1

put here value

Chvorinov's Rule = 4 × [tex](\frac{600}{760})^{1.9}[/tex]  

Chvorinov's Rule = 2.55 min/in

so heer unit flow become [tex]min/in^{1.9}[/tex]  

A pipe of inner radius R1, outer radius R2 and constant thermal conductivity K is maintained at an inner temperature T1 and outer temperature T2. For a length of pipe L find the rate at which the heat is lost and the temperature inside the pipe in the steady state.

Answers

Answer:

Heat lost from the cylindrical pipe is given by the formula,

[tex]d Q= \frac{2 \pi K L (T_{1} - T_{2} )}{log_{e}(\frac{R_{2} }{R_{1} } ) }[/tex]

Temperature distribution inside the cylinder is given by,

[tex]\frac{T - T_{1} }{T_{2} - T_{1} } = \frac{log_{e} \frac{R}{R_{1} }}{log_{e} \frac{R_{2}}{R_{1} }}[/tex]    

Explanation:

Inner radius = [tex]R_{1}[/tex]  

Outer radius = [tex]R_{2}[/tex]

Constant thermal conductivity = K

Inner temperature = [tex]T_{1}[/tex]

Outer temperature = [tex]T_{2}[/tex]

Length of the pipe = L

Heat lost from the cylindrical pipe is given by the formula,

[tex]d Q= \frac{2 \pi K L (T_{1} - T_{2} )}{log_{e}(\frac{R_{2} }{R_{1} } ) }[/tex]------------ (1)

Temperature distribution inside the cylinder is given by,

[tex]\frac{T - T_{1} }{T_{2} - T_{1} } = \frac{log_{e} \frac{R}{R_{1} }}{log_{e} \frac{R_{2}}{R_{1} }}[/tex]     ------------ (2)

 

 

Checkpoint 4.72 Write a statement that uses a conditional expression that determines if the credits variable is less than 0. If the condition is true, assign the value 0 to the credits variable, otherwise the value of the credits variable should remain unchanged.

Answers

Answer:

See step to step explanations for answer.

Explanation:

This is the expression to check if credits is less than 0 assuming variable name is credits:

if(credits<0)

{

credits = 0;

}

Q 4.69:

this is the expression checking the name is Swordfish or not

if(name=="Swordfish")

{

cout<<"We have a match";

}

Q 4.67

This is the expression to check the character assuming that character is ch

if(ch>='1' && ch<='9')

{

cout<<"Digit detected";

}

Q 4.59:

This is the statement to check if the number is between 0 and 500 inclusive . Assuming the variable is n

if(n>=0 && n<=500)

{

cout<<"The number is valid";

}

Final answer:

To address the programming question about conditional expressions, a ternary operator can be used to set the variable 'credits' to 0 if its value is less than 0, and otherwise keep the current value.

Explanation:

The student's question pertains to the use of a conditional expression in a programming context. A conditional expression evaluates a condition and based on its truth value, executes one of two expressions. The statement required should check if the credits variable is less than 0 and if so, assign the value 0 to credits; otherwise, it should leave the value of credits as is.

An example in a generic programming language would be:

credits = 0 if credits < 0 else credits

This line of code is known as a ternary operator or conditional assignment. It reads as 'Set credits to 0 if credits is less than 0; otherwise, keep the value of credits.'

An insulated piston-cylinder device contains 5 L of saturated liquid water at a constant pressure of 175 kPa. Water is stirred by a paddle wheel while a current of 8 A flows for 45 min through a resistor placed in the water. If one-half of the liquid is evaporated during this constant-pressure process and the paddle-wheel work amounts to 400 kJ, determine the voltage of the source. Also, show the process on a

Answers

Answer:

note:

solution is attached in word form due to error in mathematical equation. furthermore i also attach Screenshot of solution in word due to different version of MS Office please find the attachment

Final answer:

The voltage of the source can be determined by dividing the total energy transferred (sum of the paddle-wheel work and heat required to evaporate water) by the product of current and time. The process will be seen as a horizontal line on a piston-cylinder diagram

Explanation:

The heat transferred to the water can be calculated from the energy supplied by the electrical source and the work done by the paddle wheel. Since power is the energy transferred per unit time, we can use the equation Power = Voltage x Current. We know that the current is 8 A and the energy transferred is the sum of the work done by the paddle wheel and the heat required to evaporate half of the water, which is 45 minutes (converted to seconds) times the power. Solving for voltage we get:

Voltage = (Energy transferred) / (Current x Time)

In terms of a piston-cylinder diagram, the process will appear as a horizontal line since the pressure is constant. The line will move upwards as heat is added and some of the water is turned into steam.

Learn more about Thermodynamics here:

https://brainly.com/question/34045237

#SPJ11

(CLO 3—Boolean/Comb. Logic) It is desired to multiplex four different input data lines, a-d, onto one output. Three address lines, ("x" [MSB] through "z" [LSB]) control input-to-output selection. The three-bit address can be stated as a decimal number ranging from 0 to 7. Input a is MUXed out on address 3, b on address 4, c on 6, d on 7. Draw the MUX circuit below.

Answers

Answer:

Please find attached file for complete answer solution and explanation of same question.

Explanation:

sed is a multipurpose tool that combines the work of several filters. sed performs noninteractive operations on a data stream. sed has a host of features that allow you ti select lines and run instructions on them.
True
False

Answers

Answer:

The answer is True.

Explanation:

SED is a command in UNIX for stream editors that parses and transforms text, using a simple, compact programming language. So the answer is TRUE that sed is a multipurpose tool that combines the work of several filters and performs noninteractive operations on a data stream. sed has a host of features that allow you ti select lines and run instructions on them.

A single axial load of magnitude P = 15 kips is applied at end C of thesteel rod ABC. Knowing that E = 30 × 106 psi, determine the diameterd of portion BC for which the deflection of point C will be 0.05 in.

Answers

Answer:

d = 0.868 in

Explanation:

note:

solution is attached due to error in mathematical equation. please find the attachment

Final answer:

This question involves solving for the diameter d at the portion BC of a steel rod under axial load. It involves utilizing Hooke's Law and expressing cross-sectional area in terms of diameter. The final calculation will depend on the length of the portion BC.

Explanation:

The question appears to involve the concept of stress and strain in the area of mechanical engineering. In this problem, we have a steel rod ABC, where end C, experiencing a single axial load P = 15 kips, deflections to 0.05 inches. We are tasked to find the diameter, denoted as d, of portion BC.

To solve this, we could utilize Hooke's Law of elasticity that connects stress, strain, and the Young's modulus (E). The formula is represented as δ = PL/AE. In the equation, P is the load, L is the length, A is the cross-sectional area and E is Young's modulus. We are given P, E, and δ (deflection), leaving the cross-sectional area and length as variables to be found. Since we are looking for the diameter (d), we need to express the area (A) in terms of the diameter using the formula A = πd²/4.

The length L is dependent on the specific conditions of the problem and are not given directly. Depending on the conditions, L might need to be solved differently. First, solve the equation for diameter, afterwards, plug the known values in and evaluate, giving the diameter in inches of the steel rod at portion BC.

Learn more about Stress and Strain here:

https://brainly.com/question/36010339

#SPJ2

A particular NMOS device has parameters VT N = 0.6 V, L = 0.8µm, tox = 200 Å, and µn = 600 cm2 /V–s. A drain current of ID = 1.2 mA is required when the device is biased in the saturation region at VGS = 3 V. Determine the required channel width of the device.

Answers

Answer:

[tex]W= 3.22 \mu m[/tex]

Explanation:

the transistor In saturation drain current region is given by:

[tex]i_D}=K_a(V_{GS}-V_{IN})^2[/tex]

Making [tex]K_a[/tex] the subject of the formula; we have:

[tex]K_a=\frac {i_D} {(V_{GS} - V_{IN})^2}[/tex]

where;

[tex]i_D = 1.2m[/tex]

[tex]V_{GS}= 3.0V[/tex]

[tex]V_{TN} = 0.6 V[/tex]

[tex]K_a=\frac {1.2m} {(3.0 - 0.6)^2}[/tex]

[tex]K_a = 208.3 \mu A/V^2[/tex]

Also;

[tex]k'_n}=\frac{\mu n (\frac{cm^2}{V-s} ) \epsilon _{ox}(\frac{F}{cm} ) }{t_{ox}(cm)}[/tex]

where:

[tex]\mu n (\frac{cm^2}{V-s} ) = 600[/tex]

[tex]\epsilon _{ox}=3.9*8.85*10^{-14}[/tex]

[tex]{t_{ox}(cm)=200*10^{-8}[/tex]

substituting our values; we have:

[tex]k'_n}=\frac{(600)(3.988.85*10^{-14})}{(200*10^{-8})}[/tex]

[tex]k'_n}=103.545 \mu A/V^2[/tex]

Finally, the width can be calculated by using the formula:

[tex]W= \frac{2LK_n}{k'n}[/tex]

where;

L = [tex]0.8 \mu m[/tex]

[tex]W= \frac{2*0.8 \mu m *208.3 \mu}{103.545 \mu}[/tex]

[tex]W= 3.22 \mu m[/tex]

A developer is having a single-lane raceway constructed with a 180 km/h design speed. A curve on the raceway has a radius of 320 m, a central angle of 30 degrees, and PI stationing at 11 511.200. If the design coefficient of side friction is 0.20, determine the superelevation at the design speed (Hint: Consider normal component of the centripetal force). Also, compute the length of curve and stationing of the PC and PT.

Answers

Answer:

The answer is in the attachment.

Explanation:

Which statement is not correct regarding the deformation of a circular shaft in torsion? a. Cross sections remain flat. b. Longitudinal lines remain straight. c. Circular sections remain circular. d. Radial lines on the sections remain straight.

Answers

Answer:

B

Explanation:

Torsion is application of torque to a shaft to turn it about its longitudinal axis. When torque is applied to a shaft the circle remains unchanged in a circular state, its cross section does not warp but remains flat with a straight radial lines but its longitudinal lines changes into an helix intersecting the circular shaft

A ship tows a submerged cylinder, 1.5 m in diameter and 22 m long, at U = 5 m/s in fresh water at 20°C. Estimate the towing power in kW if the cylinder is (a) parallel, and (b) normal to the tow direction.

Answers

Based on the available information, the the estimated towing power required is:

(a) For the parallel orientation: 655 kW

(b) For the normal orientation: 4,116.75 kW

Given:

- Diameter of the cylinder: 1.5 m

- Length of the cylinder: 22 m

- Towing speed (U): 5 m/s

- Water temperature: 20°C

(a) Cylinder parallel to the tow direction:

Step 1: Calculate the drag force for the parallel orientation.

The drag force for a submerged cylinder in parallel orientation is given by the formula:

F_D = 0.5 × ρ × C_D × A × U^2

Where:

- ρ is the density of fresh water at 20°C, which is approximately 998 kg/m³.

- C_D is the drag coefficient for a cylinder in parallel orientation, which is approximately 0.82.

- A is the cross-sectional area of the cylinder, which is π × D × L = π × 1.5 m × 22 m = 103.87 m².

Calculating the drag force:

F_D = 0.5 × 998 kg/m³ × 0.82 × 103.87 m² × (5 m/s)² = 131,000 N

Step 2: Calculate the towing power for the parallel orientation.

Towing power = Drag force × Towing speed

Towing power = 131,000 N × 5 m/s = 655,000 W = 655 kW

(b) Cylinder normal to the tow direction:

Step 3: Calculate the drag force for the normal orientation.

The drag force for a submerged cylinder in normal orientation is given by the formula:

F_D = 0.5 × ρ × C_D × A × U^2

Where:

- C_D is the drag coefficient for a cylinder in normal orientation, which is approximately 1.2.

- A is the cross-sectional area of the cylinder, which is π × D × D/4 = π × 1.5 m × 1.5 m/4 = 1.77 m².

Calculating the drag force:

F_D = 0.5 × 998 kg/m³ × 1.2 × 1.77 m² × (5 m/s)² = 823,350 N

Step 4: Calculate the towing power for the normal orientation.

Towing power = Drag force × Towing speed

Towing power = 823,350 N × 5 m/s = 4,116,750 W = 4,116.75 kW

Therefore, the estimated towing power required is:

(a) For the parallel orientation: 655 kW

(b) For the normal orientation: 4,116.75 kW

. A steam turbine operates between 500°C and 3.5 MPa to 200°C and 0.3 MPa. If the turbine generates 750 kW and the heat loss is 100 kW, what is the flow rate of steam through the turbine?

Answers

Answer:

1.757 kg/s

Explanation:

According to the First Law of Thermodynamics, the physical model for a turbine working at steady state is:

[tex]-\dot Q_{out} - \dot W_{out} + \dot m \cdot (h_{in}-h_{out})=0[/tex]

The flow rate of steam is:

[tex]\dot m = \frac{\dot Q_{out}+\dot W_{out}}{h_{in}-h_{out}}[/tex]

Water enters and exits as superheated steam. After looking for useful data in a property table for superheated steam, specific enthalpies at inlet and outlet are presented below:

[tex]h_{in} = 3451.7 \frac{kJ}{kg} \\h_{out} = 2967.9 \frac{kJ}{kg} \\[/tex]

Finally, the flow rate is calculated:

[tex]\dot m = \frac{100 kW + 750 kW}{3451.7 \frac{kJ}{kg} - 2967.9 \frac{kJ}{kg}}\\\dot m =1.757 \frac{kg}{s}[/tex]

An earthen trapezoidal channel (n = 0.025) has a bottom width of 5.0 m, side slopes of 1.5 horizontal: 1 vertical and a uniform flow depth of 1.10 m. In an economic study to remedy excessive seepage from the canal two proposals, (a) to line the sides only and, (b) to line the bed only are considered. If the lining is of smooth concrete (n = 0.012), calculate the equivalent roughness in the above two cases for a bottom slope of 0.005

Answers

Answer:

A. 0.020

B. 0.018

Explanation: check the attached file

Answer:

a. n=0.020  b. n=0.018

Explanation:

a.

Case 1: To line the sides only

n=(Σn₁¹°⁵P₁)^2/3/P^2/3

n = equivalent roughness

n₁=corresponding roughness coefficients

P=length

At the bed: n₁=0.025 and P₁=5m

At the sides: n₂=0.012 and P₂= 2*1.1*√1+1.5²=2.2*1.8=3.96m

P = P₁+P₂=8.96m

Equivalent roughness, n = [5*(0.025)^1.5+3.96*(0.012)^1.5]^2/3/(8.96)^2/3

n= [(5*0.00395)+(3.96*0.0013)]^2/3/4.317

n=0.0249^2/3/4.317

n=0.0842/4.317

n=0.0195

n=0.020

b.

Case 2: To line the bed only

P₁=5m   n₁=0.012

P₂=3.96 n₂=0.025

P=8.96

Equivalent roughness n= [5*(0.012)^1.5+3.96*(0.025)^1.5]^2/3/(8.96)^2/3

n=[(5*0.0013)+(3.96*0.00395)]^2/3/4.317

n=0.0221^2/3/4.317

n=0.078/4.317

n=0.018

g Create an array of five animals. Use a for loop to display the values stored in that array. Add two more animals to the end of that array. Sort the array and display the sorted array on the screen.

Answers

Answer:

The most common approach to accessing an array is to use a for loop:

var mammals = new Array("cat","dog","human","whale","seal");

var animalString = "";

for (var i = 0; i < mammals. length; i++) {

animalString += mammals[i] + " ";

}

alert(animalString);

Discussion

A for loop can be used to access every element of an array. The array begins at zero, and the array property length is used to set the loop end.

Though support for both indexOf and lastIndexOf has existed in browsers for some time, it’s only been formalized with the release of ECMAScript 5. Both methods take a search value, which is then compared to every element in the array. If the value is found, both return an index representing the array element. If the value is not found, –1 is returned. The indexOf method returns the first one found, the lastIndexOf returns the last one found:

var animals = new Array("dog","cat","seal","walrus","lion", "cat");

alert(animals.indexOf("cat")); // prints 1

alert(animals.lastIndexOf("cat")); // prints 5

Both methods can take a starting index, setting where the search is going to start:

var animals = new Array("dog","cat","seal","walrus","lion", "cat");

alert(animals.indexOf("cat",2)); // prints 5

alert(animals.lastIndexOf("cat",4)); /

Answer:

animals = ["Dog", "Lion", "Goat", "Zebra", "Cat"]

           for animal in animals:

                       print(animal)

x = animals.insert(5, "Lizard")

y = animals.insert(6, "Bat")

z = sorted(animals)

print(z)

Explanation:

The question can be solved using various back-end coding language like python, java, JavaScript etc. But I will be writing the code with python.

The first question said we should create an array or list of five animals.

animals = ["Dog", "Lion", "Goat", "Zebra", "Cat"]  → I created the five animals in a list and stored them in the variable animals.

for animal in animals:  I used a for loop to iterate through the list print(animal)  I used print statement to display the values stored in the array or list.

x = animals.insert(5, "Lizard")  I added an animal, lizard to the end of the array

y = animals.insert(6, "Bat")  I added another animal , Bat to the end of the array.

z = sorted(animals)  I sorted the array according to alphabetical number.

print(z) I displayed the sorted array .

Before entering an underground utility vault to do repairs, a work crew analyzed the gas in the vault and found that it contained 29 mg/m3of hydrogen sulfide. Because the allowable exposure level is 14 mg/m3, the work crew began ventilating the vault with a blower. If the volume of the vault is 160 m3and the flow rate of contaminant-free air is 10 m3/min, how long will it take to lower the hydrogen sulfide level to a level that will allow the work crew to enter? Assume the manhole behaves as a CMFR and that hydrogen sulfide is nonreactive in the time period considered.

Answers

Answer:

11.65 minutes.

Explanation:

See the attached picture for detailed explanation.

Answer:

11.65 min

Explanation:

Hydrogen sulfide is very poisonous and as a result, it is essential to reduce the concentration of the gas to the lowest possible value to minimize its effects. The time taken to reduce the amount of hydrogen sulfide in the system to the allowable limit can be estimated as shown below:

t = (V/Q)*ln(Ci/Co) = (160/10)*ln(14/29) = 16*0.728 = 11.65  min

Electric heater wires are installed in a solid wall having a thickness of 8 cm and k=2.5 W/m.°C. The right face is exposed to an environment with h=50 W/m2°C and k'=30°C, while the left face is exposed to h=75 W/m2°C and T[infinity]=50°C. What is the maximum allowable heat generation rate such that the maximum temperature in the solid does not exceed 300°C.

Answers

Answer:

2.46 * 10⁵ W/m³

Explanation:

See attached pictures for detailed explanation.

Answer:

[tex]q^.=2.46*10^5W/m^3[/tex]

Explanation:

[tex]Given\\k=2.5W/m\\h_{1} =75(left)\\h_{2} =50(right)\\T_{1} =50^oC\\T_{2} =30^oC[/tex]

so

[tex]T=-\frac{q^.x^2}{2k} +c_{1}x+ c_{2} \\T=T_{1} \\at \\x=-0.04\\T=T_{2} \\at\\x=+0.04[/tex]

[tex]dT/dx=-q^.x/k+c_{1} \\T=T_{max} =300\\at\\x=c_{1} \frac{k}{q^.} (1)[/tex]

[tex]h_{1}(T_{1infinity} -T_{1} )=-k\frac{dT}{dx} |_{x=0.04} (2)\\-k\frac{dT}{dx} |_{x=0.04} =h_{2} (T_{2}-T_{2infinity} (3)[/tex]

[tex]300=-\frac{q^.}{2k} [c_{1} \frac{k}{q} ]^2+c_{1} [c_{1} \frac{k}{q} ]+c_{2} (1)[/tex]

[tex]75[50+\frac{q^2}{2k} (0.04)^2+c_{1} (0.04)-c_{2} ]=-k[\frac{+q^2(0.04)}{2k} ](2)[/tex]

[tex]-k[\frac{-q^.(0.04)}{2k} ]=50[\frac{-q^.(0.04)}{2k} +c_{1} (0.04)+c_{2} -30](3)[/tex]

solving above 3 equations for 3 unknowns c1,c2,q

we get [tex]q^.=2.46*10^5W/m^3[/tex]

Develop a simulation model for a square-wave inverter connected to a dc source of 96 V and an output frequency of 60 Hz. The load is a series RL load with R = 5 Ohm and L = 100 mH.

Answers

Answer:

The answer to this question is attached fully with the explanation.

A large tower is to be supported by a series of steel wires. It is estimated that the load on each wire will be 11,100 N (2500 lb f ). Determine the minimum required wire diameter assuming a factor of safety of 2 and a yield strength of 1030 MPa (150,000 psi).

Answers

Answer:

5.24m

Explanation:

Data given

force, F= 11,100N

safety factor,N=2

yield strength, =1030MPa

To determine the minimum diameter, we first determine the working strength which is expressed as

[tex]working strength=\frac{yield strength}{safty factor}\\ Working strength =1030/2=515MPa\\[/tex]

Since also the working strength is define as the ration of the force to the area, we have

[tex]515=\frac{11100}{A}\\ A=21.55m^{2}[/tex]

hence the required diameter is given as

[tex]A=\pi d^2/4\\d=\sqrt{\frac{4*21.55 }{\pi }} \\d=5.24m[/tex]

What is the purpose of the following algorithm? input somenum Repeat the following steps for 14 times input variable1 if variable1 < somenum then somenum = variable1 print somenum

Answers

Answer:

The purpose of the algorithm is to print the least digit among a total of 15 digita

Explanation:

input somenum

Repeat the following steps for 14 times

input variable1

if variable1 < somenum then

somenum = variable1

print somenum

On line 1, the algorithm takes an input through variable1

An iteration is started on line 2 and ends on line 6

Line 3,4,5 re performed repeatedly;

On line 3, the algorithm accepts another input through somenum and it keep accepting it till the end of the iteration.

On line 4, the algorithm tests if variable1 is lesser than somenum.

If yes, line 5 is executed and the value of variable1 is assigned to somenum

Else, line 5 is skipped; the iteration moves to line 3 as long as the condition is still valid.

At the end of the iteration, the least value stored in somenum is printed through

In this lab, you add a loop and the statements that make up the loop body to a Java program that is provided. When completed, the program should calculate two totals: the number of left-handed people and the number of right-handed people in your class. Your loop should execute until the user enters the character X instead of L for left-handed or R for right-handed.The inputs for this program are as follows: R, R, R, L, L, L, R, L, R, R, L, XVariables have been declared for you, and the input and output statements have been written.

Answers

Answer:

use this to help www.code.org

Explanation:

this helped me alot

Silicon carbide nanowires of diameter 15 nm can be grown onto a solid silicon carbide surface by carefully depositing droplets of catalyst liquid onto a flat silicon carbide substrate. Silicon carbide nanowires grow upward from the deposited drops, and if the drops are deposited in a pattern, an array of nanowire fins can be grown, forming a silicon carbide nano-heat sink. Consider finned and unfinned electronics packages in which an extremely small, 10 μm × 10 μm electronics device is sandwiched between two 100-nm-thick silicon carbide sheets. In both cases, the coolant is a dielectric liquid at 20°C. A heat transfer coefficient of 1.0 × 105 W/m2·K exists on the top and bottom of the unfinned package and on all surfaces of the exposed silicon carbide fins, which are each 300 nm long. Each nano-heat sink includes a 50 × 50 array of nanofins. Determine the maximum allowable heat rate that can be generated by the electronic device so that its temperature is maintained at 95°C for (a) the unfinned and (b) the finned packages

Answers

Answer:

Please find attached file for complete answer.

Explanation:

The yield of a chemical process is being studied.The two most important variables are thought to be the pressure and the temperature.Three levels of each factor are selected, and a factorial experiment with two replicates is performed.The yield data follow:_____.

emperature 150 160 170 200 90.1 90.3 90.5 90.7 90.4 90.2 Pressure 215 90.5 90.6 90.8 90.9 90.7 90.6 230 89.9 90.1 90.4 90.1 90.2 90.4

a) Analyze the data and draw conclusions.Use α = 0.05.

b) Prepare appropriate residual plots and comment on the model’s adequacy.

c) Under what conditions would you operate this process?(a

Answers

Answer:

note:

solution is attached in word form due to error in mathematical equation. furthermore i also attach Screenshot of solution in word due to different version of MS Office please find the attachment

3. Suppose that a class named Bicycle contains a private nonstatic integer named height, a public nonstatic String named model, and a public static integer named wheels. Which of the following are legal statements in a class named BicycleDemo that has instantiated an object as Bicycle myBike new Bicycle C);? f. Bicycle. model Hurricane a. myBike height 26; b. my Bike model Cyclone g. Bicycle. int 3 3; c. myBike Wheels 3 d. my Bike .model 108; i. Bicycle wheels 2 e. Bicycle height 24; j. Bicycle yourBike myBike

Answers

Answer:

The solution to the given problem is provided below.

Explanation:

a.) myBike.height = 26;                                                 Not Legal statement

b.) myBike.model = “Cyclone”:                                    Legal statement

c.) myBike.wheels = 3;                                                  Legal statement

d.) myBike.model = 108;                                               Not legal statement

e.) Bicycle.height = 24;                                                  Not Legal statement

f.) Bicycle.model = “Hurricane”;                                 Not legal statement

g.) Bicycle.int = 3;                                                           Not Legal statement

h.) Bicycle.model = 108;                                                Not Legal Statement

i.) Bicycle.wheels = 2;                                                    Legal Statement

j.) Bicycle yourBike = myBike;                                      Legal Statement

The water behind Hoover Dam is 206m higher than the Colorado river below it. At what rate must water pass through the hydraulic turbines of this dam to produce 100 MW of power if the turbines are 100 percent efficient?

Answers

Answer:

m' = 4948.38 kg/s

Explanation:

For a case of 100% efficiency, the power produced must be equal to the rate of potential energy conversion

GIVEN THAT

Power = 100 MW

rate of Potential energy = (m')*g*h

100*10^6 = (m')*9.81*206

m' = 4948.38 kg/s

Answer:

49.484 m³ / s

Explanation:

Volume flow rate = Power in W / (efficiency × density × height × acceleration due to gravity)

Volume flow rate = 100 × 10⁶ / ( 1 × 1000 kg/m³ × 206 m × 9.81 m/s²)

V = 49.484 m³ / s

15 points) A horizontal curve is being designed for a new two-lane highway (12-ft lanes). The PI is at station 250 00, design speed is 65 mph, and a maximum superelevation of 0.08 ft/ft is to be used. If the central angle of the curve is 35 degrees, design a curve for the highway by computing the radius and stationing of the PC and PT.

Answers

Answer:

59.78 m

Explanation:

Data:

PI station = 250 will allow a speed of 65 mph

The maximum superelevation will be  = 0.08 ft/ft

Central angle of the curve                    =  35 degrees

A figure will be used to present the information. This gives the height of 59.78 m as the maximum elevation for the safe speed of the vehicle.

Other Questions
Which of the following statements represent data rather than interpretation? Which of the following statements represent data rather than interpretation? Yellowstone N.P. has an area of low topography nearby caused by hotter than average mantle below the crust. There is an area of low topography southwest of Yellowstone Volcanic features in Yellowstone N.P. are related to the process that produced the low topography to its west. The low topography to the west of Yellowstone N.P. formed when North America moved over a hot spot. Yellowstone N.P. is a supervolcano. The Carousel in the National Mall has 4 rings of horses. Kelly is riding on the inner ring, which has a radius of 9 feet. Maya is riding on the outer ring, which is 8 feet farther out from the center than the inner ring is. In one rotation of the carousel, how much farther does Maya travel than Kelly? One rotation of the carousel takes 12 seconds. How much faster does Maya travel than Kelly? | 57. Macy, Sydney, and Alle are sisters. Macy is liyoyears older than Sydney and Allie is one warless than half the age of Sydney. If the sum oftheir ages is 31, how old is Magy? What is the annual rate of return on a bond bought on the open market called?A. coupon rateB. yieldC. maturityD. par value How to solve 47x82 on an area model when considering the cost of paying for college, which statement is NOT true? A)Scholarships have to be paid back. B)Scholarships are awarded based on merit. C)Scholarship can based on grades or athletic ability Eliminate D)Scholarships can be based on an affiliation to an organization. If the principles of social learning theory are true, then children may model aggressive behavior ________. after dreaming about having a fight with their parents after dreaming they were on television after seeing a television character being punished for taking violent action against another character after seeing a television character receive a reward for taking violent action against another character Guarantees also may trigger financial statement recognition of a liability. Which of the following guarantees would not require financial statement recognition on the books of the guarantor? a. Guarantee to repay the debt of another firm that is solvent and profitable (the interest rate of the debt was not reduced due to the guarantee) b. Guarantee to repurchase accounts receivable sold in a prior transaction if the receivables become uncollectible c. Guarantee to repay the debt of another firm that is insolvent d. Guarantee to repay the debt of another firm that is currently solvent but has no history of profitability (the interest rate of the debt was reduced due to the guarantee) Caro estimates that the variable costs in the Maintenance Department total $11,000, and in the Cafeteria variable costs total $17,000. Avoidable fixed costs in the Maintenance Department are $5,000. Required: If Caro outsources the Maintenance Department, what is the maximum it can pay an outside vendor without increasing total costs Textile mills in America and Europe became more efficient due to advancements in machinery such as the Spinning Jenny and power loom. What resulted from the technology advancements in the textile industry? 1. Para comer una ensalada necesitas2. Para tomar caf necesitas3. Para poner la comida en la mesa necesitas Research is always a lengthy process. True False A flagpole, 12 m high, is supported by three wires attached from the top of the pole to the ground. Each wire is pegged into the ground 5 m from the pole. How much wires needed to supported the pole? The development of a product that is closely related to one or more products in the existing product line, but designed specifically to meet somewhat different customer needs is best described as a(n) _______. a. quality modification b. aesthetic modification c. product modification d. brand extension Unstructured decisions are often used in _____. a. introducing a new product b. simple inventory problems c. record keeping d. capital acquisition analysis A student performed an experiment to test theacidity of foods. Put the following steps in the orderthey should occur.The studentrecords the acidity of the food.asks a question about food's acidity.observes that there are acidic foods.presents the results to the class.prepares to conduct the experiment.creates a hypothesis about the acidity.) Intro000000000000DDDDDDDDDDD What does the value of x have to be so that(x,-7) and (-1,4) have a slope of 11/4 between them? The question is write the name of each term in the blank938+347722=2007 The Christmas Bird Count (CBC) is an annual tradition in Lexington, Massachusetts. A group of volunteers counts the number of birds of different species over a 1-day period. Each year, there are approximately 3035 hours of observation time split among multiple volunteers. The following counts were obtained for the Northern Cardinal (or cardinal, in brief) for the period 20052011.Year Number2005 762006 472007 632008 532009 622010 692011 625.126 What is the mean number of cardinal birds per year observed from 2005 to 2011?5.127 What is the standard deviation (sd) of the number of cardinal birds observed?5.128 What is the probability of observing at least 60 cardinal birds in 2012? (Hint: Apply a continuity correction where appropriate.)The observers wish to identify a normal range for the number of cardinal birds observed per year. The normal range will be defined as the interval (L, U), where L is the largest integer 15th percentile and U is the smallest integer 85th percentile.5.129 If we make the same assumptions as in Problem 5.128, then what is L? What is U?5.130 What is the probability that the number of cardinal birds will be U at least once on Christmas day during the 10-year period 20122021? (Hint: Make the same assumptions as in Problem 5.128.) Competing in the markets of foreign countries entails dealing with such factors except:_____. a) important country-to-country differences in consumer buying habits and buyer tastes and preferences. b) the prevalence of global brands. c) whether to customize the company's offerings in each different country market or whether to offer a mostly standardized product worldwide. d) fluctuating exchange rates, country-to-country variations in host-government restrictions and requirements, and variations in cultural, demographic, and market conditions. e) the fact that product designs suitable for one country are sometimes inappropriate in another.