Write a program that takes in a string that holds the values "day" or "night" and an integer that holds a person's age, and outputs a movie ticket price. Movie prices are free for everyone under the age of 4 . Daytime prices are $ 8for everyone age 4 or higher. Nighttime prices are$12for ages4−16,$15for ages 17 - 54 and$13for ages 55 and above. Ex: If the input is: night 50 the output is:$15Ex: If the input is: day 15the output is:$8Ex: If the input is: night 3 the output is: free4423222900170.9×3z9y7\begin{tabular}{l|l|} \hline LAB & 4.28.1: LAB: Movie ticket prices \\ ACTIIIY & LabProgram.java \\ Load default template... \\ 1 & import java. util. Scanner; \\ 2 & \\ 3 public class LabProgram \{ \\ 4 & public static void main(String[] args) \{ \\ 5 & Scanner scnr=new Scanner(System.in); \\ 6 & / Type your code here.∗/\end{tabular}

Answers

Answer 1

Here's a possible solution in Java:

java

Copy code

import java.util.Scanner;

public class LabProgram {

  public static void main(String[] args) {

     Scanner scnr = new Scanner(System.in);

     String timeOfDay = scnr.next();

     int age = scnr.nextInt();

     double ticketPrice = 0.0;

     

     if (age < 4) {

        ticketPrice = 0.0;

     } else if (timeOfDay.equals("day")) {

        ticketPrice = 8.0;

     } else if (age >= 4 && age <= 16) {

        ticketPrice = 12.0;

     } else if (age >= 17 && age <= 54) {

        ticketPrice = 15.0;

     } else if (age >= 55) {

        ticketPrice = 13.0;

     }

           System.out.printf("$%.0f", ticketPrice);

  }

}

The program first reads in the time of day and age inputs from the user. It then initializes a ticketPrice variable to 0.0, and uses a series of if statements to determine the appropriate ticket price based on the age and time of day inputs. The printf statement at the end of the program prints out the final ticket price in a formatted string.

For more questions like values visit the link below:

https://brainly.com/question/24066465

#SPJ11


Related Questions

New tie rod ends are being installed. Technician A says it is a good idea to replace the cotter pin. Technician B says to tighten the retaining nut to the low side of the torque spec then further tighten to align the cotter key hole. Which technician is correct

Answers

Answer:

technician b?

Explanation:

For an electronic throttle control system if the extreme position values for an output of 0.6 V and 4.4 V correspond to 6 deg and 85 deg respectively, what will be the angular position if the voltage output from the Throttle position sensor is at 1.9 V.

Answers

To determine the angular position corresponding to a voltage output of 1.9 V in the electronic throttle control system, we can use a linear interpolation based on the given extreme position values. The angular position corresponding to a voltage output of 1.9 V from the Throttle position sensor would be approximately 33.13 degrees.

First, let's calculate the voltage range and the corresponding angular range:

Voltage range = 4.4 V - 0.6 V = 3.8 V

Angular range = 85 deg - 6 deg = 79 deg

Next, we need to calculate the voltage difference between the given voltage (1.9 V) and the lower extreme position voltage (0.6 V):

Voltage difference = 1.9 V - 0.6 V = 1.3 V

Now, we can calculate the proportional angular difference:

Angular difference = (Voltage difference / Voltage range) * Angular range

Angular difference = (1.3 V / 3.8 V) * 79 deg ≈ 27.13 deg

Finally, we add the angular difference to the lower extreme position value to find the angular position corresponding to the voltage output of 1.9 V:

Angular position = 6 deg + 27.13 deg ≈ 33.13 deg

Therefore, the angular position corresponding to a voltage output of 1.9 V from the Throttle position sensor would be approximately 33.13 degrees.

Learn more about electronic here

https://brainly.com/question/28630529

#SPJ11

what is the minimum distance that targets are engaged firing a mk-19

Answers

The minimum distances that targets are engaged firing a MK-19 grenade launcher with HE ammunition is 310m or greater.

Both offensive and defensive duties are supported by the MK-19 Grenade Machine Gun by the troops. When used against hostile personnel and lightly armored vehicles, it provides a sizable volume of accurate and continuous firepower. The MK19 can be mounted on a tripod or various bases for vehicles. It serves as the main suppressive tool for troops that provide combat support and combat service support. The weapon can defend bivouac supply trains, assembly lines, and motorized mobility.

The MK19 Grenade Machine Gun can attack targets with high volume fire into an engagement area as well as indirect fires from concealed positions. It can protect against hovering rotary-wing aircraft, take out lightly armored vehicles, and fire on suspected enemy positions. With the help of high-explosive, dual-purpose ammunition, the system improves the ability of American forces to defeat hostile armored, mechanized, and infantry forces.

Learn more about MK-19:

https://brainly.com/question/15356238

#SPJ4

Complete question is:

The minimum distances that targets are engaged firing a MK-19 grenade launcher with HE ammunition is ___

primary u.s. interstate highways are numbered 1-99. odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. thus, the 405 services the 5, and the 290 services the 90. given a highway number, indicate whether it is a primary or auxiliary highway. if auxiliary, indicate what primary highway it serves. also indicate if the (primary) highway runs north/south or east/west. ex: if the input is 90, the output is: the 90 is primary, going east/west. ex: if the input is 290, the output is: the 290 is auxiliary, serving the 90, going east/west. ex: if the input is not 1-999, such as 0, the output is:

Answers

The 120 is auxiliary, serving the 20, going east/west.

The numbering system for U.S. interstate highways provides valuable information about their primary or auxiliary status, as well as their orientation. Primary interstate highways are numbered from 1 to 99, and odd numbers indicate north/south routes, while even numbers indicate east/west routes. On the other hand, auxiliary highways are numbered from 100 to 999 and serve the primary highways indicated by the rightmost two digits.

In the given example, the highway number is 120. Since it falls within the range of auxiliary highways, we can determine that it is an auxiliary highway. The rightmost two digits, 20, indicate that it serves the primary highway 20. Additionally, the even number 20 signifies that the primary highway runs in an east/west direction.

By following this numbering convention, transportation authorities can provide a clear system for identifying the primary and auxiliary highways and their respective orientations, facilitating navigation and understanding for drivers.

Learn more about interstate highways

brainly.com/question/32223436

#SPJ11

Show the stack with all ARIs, including static and dynamic chains, when execution reaches position 1 in the following skeletal program, beginning with the call to the procedure A from BIGSUB at position start (BIGSUB calls A, A calls C, C calls D, D calls A, A calls B). What is the nonlocal reference to x at program point 1, assuming static scoping?
procedure BIGSUB;
var x, y:integer;
procedure A (flag: boolean);
procedure B;
begin {B}
end; {B}
begin {A}
if flag
then B
else C
end; {A}
Procedure C;
var x: integer;
procedure D;
begin {D}
A(true)
end; {D}
begin { C}
D
end; {C}
begin {BIGSUB}
end; {BIGSUB}

Answers

Stack with all ARIs (Activation Record Instances) when execution reaches position 1:

ARI for procedure BIGSUB (main program) - Contains variables x and y.

The Stacks

ARI for procedure A (called from BIGSUB) - Contains parameter flag.

ARI for procedure C (called from A) - Contains variable x.

ARI for procedure D (called from C) - No local variables.

ARI for procedure A (called from D) - Contains parameter flag.

Nonlocal reference to x at program point 1, assuming static scoping:

The nonlocal reference to x at program point 1 would be the variable x declared in the ARI of procedure C (the closest enclosing scope), since static scoping uses the lexical nesting of procedures to determine variable bindings.

Read more about parameter flags here:

https://brainly.com/question/29887742

#SPJ4

Consider a simple ideal Rankine cycle and an ideal regenerative Rankine cycle with one open feedwater heater. The two cycles are very much alike, except the feedwater in the regenerative cycle is heated by extracting some steam just before it enters the turbine. Hence, the simple ideal Rankine cycle is more efficient than the ideal regenerative Rankine cycle. How would you compare the efficiencies of of these two cycles?

Answers

Answer:

They both have the same efficiency.

Explanation:

The simple ideal Rankine cycle and an ideal regenerative Rankine cycle with one open feedwater heater would both have the same efficiency because the extraction steam would just create a mini cycle that recirculates. The energy given to the feedwater heater is proportional to the added heat in the boiler to the feedwater in the simple cycle to raise its temperature to the same boiler inlet condition.

Therefore in comparison, the efficiency is the same for both.

Three common controls used in central electric heat applications are
A. capacitors, thermostats, and contactors.
B. thermostats, contactors and sequencers.
C. cool anticipators, relays, and contactors.
D. capacitors, cool anticipators, and sequencers.

Answers

Three common controls used in central electric heat applications are thermostats, contactors, and sequencers.The correct answer is option B.

Thermostats play a crucial role in controlling the temperature in a central electric heating system. They detect the ambient temperature and send signals to the heating system to turn on or off accordingly.

Thermostats allow users to set their desired temperature and maintain it within a specific range, ensuring comfort and energy efficiency.

Contactors are electrical switches that control the flow of electricity to the heating elements. They are responsible for connecting or disconnecting the power supply to the heating system based on the signals received from the thermostat.

Contactors are essential for ensuring the safe and efficient operation of the electric heat system.

Sequencers are used to control the sequencing or timing of the electric heating elements. They ensure that the heating elements turn on and off in a specific order to prevent excessive power consumption and ensure even heating.

Sequencers also help protect the electrical system from overload conditions by controlling the activation of heating elements in a coordinated manner.

In conclusion, the correct answer is B. Thermostats, contactors, and sequencers are the three common controls used in central electric heat applications.

For more such questions on thermostats,click on

https://brainly.com/question/15292002

#SPJ8

me that both a triaxial shear test and a direct shear test were performed on a sample of dry sand. When the triaxial test is performed, the specimen was observed to fail when the major and minor principal stresses were 100 lb/in2 and 20 lb/in2, respectively. When the direct shear test is performed, what shear strength can be expected if the normal stress is 3000 lb/ft2

Answers

Answer:

shear strength = 2682.31 Ib/ft^2

Explanation:

major principal stress = 100 Ib / in2

minor principal stress = 20 Ib/in2

Normal stress = 3000 Ib/ft2

Determine the shear strength when direct shear test is performed

To resolve this we will apply the coulomb failure criteria relationship between major and minor principal stress a

for direct shear test

use Mohr Coulomb criteria relation between normal stress and shear stress

Shear strength when normal strength is 3000 Ib/ft  = 2682.31 Ib/ft^2

attached below is the detailed solution

me that both a triaxial shear test and a direct shear test were performed on a sample of dry sand. When

An o ring intended for use in a hydraulic system using MIL-H-5606 (mineral base) fluid will be marked with

Answers

An o ring intended for use in a hydraulic system using MIL-H-5606 (mineral base) fluid will be marked with a blue stripe or dot.

.If a steganography application used lossless encryption, the output carrier would be __________ compared to the original carrier file.
Group of answer choices
identical
unusable
larger
smaller

Answers

Answer: If a steganography application used lossless encryption, the output carrier would be identical compared to the original carrier file.

Explanation : Steganography is the study of concealing secret data inside an ordinary, non-secret message or information. Steganography is a common technique used to hide information or data within image files. The term "steganography" comes from the Greek language and means "covered writing."The basic requirements for the implementation of Steganography are as follows:Imperceptibility: The changes made to the carrier data should be imperceptible to a human observer.Capacity: The amount of data that can be concealed in the carrier data should be large.Security: The information hidden inside the carrier data should not be easy to detect or extract.For the given problem, if a steganography application used lossless encryption, the output carrier would be identical compared to the original carrier file. Lossless compression algorithms minimize file size while maintaining the original quality of the file.

Learn more about Steganography here https://brainly.in/question/9509627

#SPJ11

Assertion theory is based on the premise that every person has certain baasic right s

Answers

Answer: wish I could help

Explanation:

Just answering for the points don't mind me

A square plate of titanium is 12cm along the top, 12cm on the right side, and 5mm thick. A normal tensile force of 15kN is applied to the top side of the plate. A normal tensile force of 20kN is applied to the right side of the plate. The elastic modulus, E, is 115 GPa for titanium.If the left and bottom edges of the plate are fixed, calculate the normal strain and elongation of both the TOP and RIGHT side of the plate.

Answers

Answer:

\(X_t=2.17391304*10^{-4}\)

\(X_r=2.89855072*10^{-4}\)

\(e_t=0.0026\)

\(e_r=0.0035\)

Explanation:

From the question we are told that:

Dimension \(12*12\)

Thickness \(l_t=5mm=5*10^-3\)

Normal tensile force on top side \(F_t= 15kN\)

Normal tensile force on right side  \(F_r= 20kN\)

Elastic modulus, \(E=115Gpap=>115*10^9\)

Generally the equation for Normal Strain X is mathematically given by

 \(X=\frac{Force}{Area*E}\)

Therefore

For Top

 \(X_t=\frac{Force_t}{Area*E}\)

Where

 \(Area=L*B*T\)

 \(Area=12*10^{-2}*5*10^{-3}\)

 \(Area=6*10^{-4}\)  

 \(X_t=\frac{15*10^3}{6*10^{-4}*115*10^9}\)

 \(X_t=2.17391304*10^{-4}\)

For Right side\(X_r=\frac{Force_r}{Area*E}\)

Where

Area=L*B*T

 \(Area=12*10^{-2}*5*10^{-3}\)

 \(Area=6*10^{-4}\)  

 \(X_r=2.89855072*10^{-4}\)

 \(X_r=2.89855072*10^{-4}\)

Generally the equation for elongation is mathematically given by

 \(e=strain *12\)

For top

 \(e_t=2.17391304*10^{-4}*12\)

 \(e_t=0.0026\)

For Right

 \(e_r=2.89855072*10^{-4} *12\)

 \(e_r=0.0035\)

Who certifies master electricians

Answers

Answer:

The state you live in

The state you live in for instance I live in California An electrician must hold a state license to work in California. The C-10 Electrical Contractor license is issued by the Department of Consumer Affairs, Contractors State License Board and will be required before you bid on any projects worth $500 or more

Problem 2 Six years ago, an 80-kW diesel-electric set cost $145,000. The cost index for this class of equipment six years ago was 187 and is now 194. The plant engineering staff was considering a 120−kW unit of the same general design to power a small isolated plant that would have cost $200,145. Based on the information above the plant engineering staff is considering a 100−kW unit of the same general design to power a small isolated plant. Assume we want to add a pre-compressor, which (when isolated and estimated separately) currently costs $10,000. Determine the total cost of the 100−kW unit.

Answers

The total cost of the 100−kW unit= Cost of 100−kW unit + Additional cost of the pre-compressor= $166,786 + $10,000= $176,786.

Given: Cost of 80-kW diesel-electric set six years ago = $145,000Cost index for this class of equipment six years ago = 187Cost index for this class of equipment now = 194Cost of 120−kW unit of the same general design to power a small isolated plant = $200,145

The plant engineering staff is considering a 100−kW unit of the same general design to power a small isolated plant.Cost of adding pre-compressor = $10,000

To determine the total cost of the 100−kW unit, we need to find the cost of the 80-kW diesel-electric set at present, the cost of the 100−kW unit, and the additional cost of the pre-compressor.Cost of 80-kW diesel-electric set at present= Cost of 80-kW diesel-electric set six years ago × (Cost index for this class of equipment now / Cost index for this class of equipment six years ago)= $145,000 × (194 / 187)= $150,816.34Cost per kW of the 80-kW diesel-electric set= Cost of 80-kW diesel-electric set at present / 80= $150,816.34 / 80= $1,885.20

Cost per kW of the 120−kW unit= Cost of 120−kW unit / 120= $200,145 / 120= $1,667.87The cost of the 100−kW unit of the same general design= 100 × Cost per kW of the 120−kW unit= 100 × $1,667.87= $166,786

Additional cost of the pre-compressor= $10,000. Hence, the total cost of the 100−kW unit is $176,786.

To know more about diesel electric set visit :

https://brainly.com/question/13175083

#SPJ11

is the intentional insertion in any manner of electromagnetic

Answers

The incomplete question seems to be about the definition of electromagnetic interference (EMI).

EMI is the unintentional or intentional emission or reception of electromagnetic energy that disrupts the operation of electronic devices or systems. It can be caused by a variety of sources, including electronic devices, power lines, radio waves, and even natural phenomena like lightning. The intentional insertion of EMI, known as electromagnetic jamming, is a technique used in warfare to disrupt or disable enemy electronics. However, in most cases, EMI is unwanted and can cause malfunctions or even damage to electronic equipment.

In summary, EMI refers to the unintended or intentional transmission of electromagnetic energy that interferes with electronic devices or systems. While intentional EMI can be used in warfare, it is typically unwanted and can cause malfunctions or damage to electronic equipment.

To learn more about electromagnetic interference :  brainly.com/question/12572564

#SPJ11

The component has an exponentially distributed reliability with a mean of 2000 hours what is the probability that it will fail after 3000 hours?

Answers

Answer:

ABCDEFGHIJKLMNOPQRSTUVWXYZ

Determine the minimum required wire radius assuming a factor of safety of 3 and a yield strength of 1500 MPa.

Answers

This question is incomplete, the complete question is;

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.

Determine the minimum required wire radius assuming a factor of safety of 3 and a yield strength of 1500 MPa.

answer in mm please

Answer:

the minimum required wire radius is 5.3166 mm

Explanation:

Given that;

Load F = 11100N

N = 3

∝y = 1500 MPa

∝workmg = ∝y / N = 1500 / 3 = 500 MPa

now stress of Wire:

∝w = F/A

500 × 10⁶ = 11100 / A

A = 22.2 × 10⁻⁶ m²

so

(π/4)d² = A

(π/4)d² = 22.2 × 10⁻⁶

d² = 2.8265 × 10⁻⁵

d = 5.3165 7 × 10⁻³ m³

now we convert to mm(millimeters)

d = 5.3166 mm

Therefore the minimum required wire radius is 5.3166 mm

I2 + KOH = KIO3 + KI + H2O Marque la(s) respuesta(s) falsas: La suma de coeficientes mínimos del agua y el agente reductor es 6 El KI es la forma reducida El KOH es el agente reductor La suma de electrones transferidos más el coeficiente mínimo del agua suman 16 La relación entre el agente oxidante y el agente reductor es 1

Answers

Answer:

Las declaraciones falsas incluyen

- El KOH es el agente reductor.

- La suma de electrones transferidos más el coeficiente mínimo de agua suman 16.

Todas las otras declaraciones son ciertas.

The false statements include

- The KOH is the reducing agent.

- The sum of transferred electrons plus the minimum coefficient of water add up to 16.

All the other statements are true.

Explanation:

Es evidente que esta es una reacción redox en presencia de medio básico. Entonces, equilibraremos esta reacción redox en pasos. I₂ + KOH → KIO₃ + KI + H₂O

Paso 1 Eliminar los iones espectadores; Estos son los iones que aparecen en ambos lados de la reacción. Es evidente que solo el ion de potasio (K⁺) es el ion espectador de esta reacción.

I₂ + OH⁻ → IO₃⁻ + I⁻ + H₂O

Paso 2

Separamos la reacción en las medias reacciones de oxidación y reductina. La oxidación es la pérdida de electrones que conduce a un aumento del número de oxidación del ion, mientras que la reducción es la ganancia de elecrones que conduce a una disminución en el número de oxidación del ion. También es evidente que es el gas de yodo el que se reduce y oxida para esta reacción.

El gas de yodo se reduce a I⁻ (el número de oxidación se reduce de 0 a -1) y el gas de yodo se oxida a IO₃⁻ (el número de oxidación de yodo aumenta de 0 en gas de yodo a +5 en IO₃⁻)

Reducción media reacción

I₂ → I⁻

Media reacción de oxidación

I₂ + OH⁻ → IO₃⁻ + H₂O

Paso 3

Equilibramos las medias reacciones y agregamos los respectivos electrones transferidos

Reducción media reacción

I₂ → 2I⁻

I₂ + 2e⁻ → 2I⁻

Media reacción de oxidación

I₂ + 12OH⁻ → 2IO₃⁻ + 6H₂O

I₂ + 12OH⁻ → 2IO₃⁻ + 6H₂O + 10e⁻

Paso 4

Balancee el número de electrones en las dos medias reacciones

[I₂ + 2e⁻ → 2I⁻] × 5

[I₂ + 12OH⁻ → 2IO₃⁻ + 6H₂O + 10e⁻] × 1

5I₂ + 10e⁻ → 10I⁻

I₂ + 12OH⁻ → 2IO₃⁻ + 6H₂O + 10e⁻

Paso 5

Agregue las dos medias reacciones y elimine cualquier especie que aparezca en ambos lados

5I₂ + 10e⁻ + I₂ + 12OH⁻ → 10I⁻ + 2IO₃⁻ + 6H₂O + 10e⁻

Entonces, eliminamos los 10 electrones que fueron transferidos en la reacción balanceada

6I₂ + 12OH⁻ → 10I⁻ + 2IO₃⁻ + 6H₂O

Paso 6

Reintroducimos la especie eliminada desde el principio (el ion potasio)

6I₂ + 12KOH → 10KI + 2KIO₃ + 6H₂O

Los coeficientes mínimos son entonces

3I₂ + 6KOH → 5KI + KIO₃ + 3H₂O

Luego verificamos cada una de las declaraciones proporcionadas para elegir las falsas.

- La suma de los coeficientes mínimos del agua y el agente reductor es 6.

El gas yodo es el agente reductor y oxidante. Coeficiente mínimo de agua y gas de yodo = 3 + 3 = 6 Esta afirmación es cierta.

- El KI es la forma reductora KI resulta de la semirreacción de reducción.

Por lo tanto, es la forma reducida del gas de yodo. Esta afirmación es cierta. - El KOH es el agente reductor. KOH no es el agente reductor. Esta afirmación es falsa.

- La suma de los electrones transferidos más el coeficiente mínimo de agua suman 16.

Electrones transferidos = 10

Coeficiente mínimo de agua = 3

Suma = 13 y no 16.

Esta afirmación es falsa.

- La proporción del agente oxidante y el agente reductor es 1.

Dado que el gas yodo es el agente reductor y oxidante, la proporción de estos dos es verdaderamente 1. Esta afirmación es cierta.

¡¡¡Espero que esto ayude!!!

What types of information are provided in the invitation to bid?

Answers

Answer:

A comprehensive Invitation for Bid (IFB) solicitation will describe the planned project in detail, lay out submission requirements including deadlines, project scope and duration, minimum qualifications, mandatory service standards, and required warranties.

In this exercise, we make several assumptions. First, we assume that an N-issue superscalar processor can execute any N instructions in the same cycle, regardless of their types. Second, we assume that every instruction is independently chosen, without regard for the instruction that precedes or follows it. Third, we assume that there are no stalls due to data dependences, that no delay slots are used, and that branches execute in the EX stage of the pipeline. Finally, we assume that instructions executed in the program are distributed as follows:
Alu Correctly predicted bed incorrectly predicted beq Iw Sw
a. 50% 18% 2% 20% 10%
b. 40% 10 5% 35% 10%
[10] <4.10> In a 2-issue static superscalar whose predictor can only handle one branch per cycle, what speed-up is achieved by adding the ability to predict two branches per cycle? Assume a stall-on-branch policy for branches that the predictor can not handle.

Answers

In the given exercise, several assumptions are made regarding the execution of instructions in an N-issue superscalar processor. These assumptions include the ability to execute any N instructions in the same cycle, independently chosen instructions, no stalls due to data dependencies, no delay slots, and branches executing in the EX stage of the pipeline. Additionally, the distribution of instructions executed in the program is also given.

To calculate the speedup achieved by adding the ability to predict two branches per cycle in a 2-issue static superscalar, we need to consider the impact of this change on the branch instructions.

Currently, the predictor can only handle one branch per cycle, so any additional branch instructions result in a stall. With the ability to predict two branches per cycle, the number of stalls due to branches can be reduced.

Assuming a stall-on-branch policy for branches that the predictor cannot handle, we can calculate the speed-up achieved as follows:

In the current configuration, the percentage of correctly predicted branches is 18% + 35% = 53%.
With the ability to predict two branches per cycle, the percentage of correctly predicted branches increases to 18% + 5% + 35% + 10% = 68%.
Therefore, the speedup achieved by adding the ability to predict two branches per cycle is (68% - 53%) / 53% = 28%.

In summary, adding the ability to predict two branches per cycle in a 2-issue static superscalar can achieve a speed-up of 28% by reducing the number of stalls due to branches. However, this calculation assumes that the other assumptions listed in the exercise continue to hold.

to know more about superscalar processor:

https://brainly.com/question/29671592

#SPJ11

Point charges of 2μC, 6μC, and 10μC are located at A(4,0,6), B(8,-1,2) and C(3,7,-1), respectively. Find total electric flux density for each point: a. P1(4, -3, 1)

Answers

To find the total electric flux density at point P1(4, -3, 1), calculate the electric field contribution from each point charge (2μC, 6μC, and 10μC) and sum them up.

To find the total electric flux density at point P1(4, -3, 1), we need to calculate the electric field contribution from each point charge (2μC, 6μC, and 10μC). The electric field at a point due to a point charge is given by Coulomb's law. By considering the distance between each point charge and point P1, we can calculate the electric field vectors. Then, by summing up the electric field vectors from each charge, we obtain the total electric field at point P1. The magnitude and direction of this total electric field represent the electric flux density at that point.

Learn more about electric flux density here:

https://brainly.com/question/33224621?

#SPJ11

when torublehooting an engine for too rich mixture to allow th engine to idle, what would be a possible cause

Answers

When troubleshooting an engine for too rich mixture to allow the engine to idle, the possible cause could be that there is a misadjusted carburetor.

This means that the air/fuel mixture is not adjusted properly and is allowing too much fuel into the engine, causing it to run rich. Another possible cause is that the fuel system may be clogged or dirty, causing the fuel to not be delivered properly to the engine. This can cause the engine to idle poorly and run rich.There are a few things that can be done to troubleshoot this issue.

The first step is to check the carburetor and make sure that it is adjusted properly. The air/fuel mixture should be adjusted so that the engine is running at the correct RPM and there is no hesitation or misfire. If the carburetor is misadjusted, it will need to be corrected.

Learn more about misadjusted carbureto:  https://brainly.com/question/24946792

#SPJ11

Now, you get a turn to practice writing a short program in Scratch. Try to re-create the program that was shown that turns the sprite in a circle. After you have completed that activity, see if you can make one of the improvements suggested. For example, you can try adding a sound. If you run into problems, think about some of the creative problem-solving techniques that were discussed.

When complete, briefly comment on challenges or breakthroughs you encountered while completing the guided practice activity.


Pls help im giving 100 points for this i have this due in minutes

Answers

Answer:

u need to plan it out

Explanation:

u need to plan it out

Answer:

use the turn 1 degrees option and put a repeat loop on it

Explanation:

u can add sound in ur loop

A venture tube is used to measure the flow rate of a liquid in a pipe (liquid density is 800 kg/m3). The pipe has a diameter of 10 cm and the smallest diameter of the venture has a diameter of 4 cm. A manometer with a manometer fluid of mercury (specific weight of 133 kN/m3) is used to calculate the flow rate which is connected to the venture section such that one leg is far upstream and the second leg is at the minimum diameter of the venture tube. If the flow rate is 0.05 m3/s determine the elevation change in the manometer fluid.
a. 14.6 m
b. 9.28 m
c. 4.64 m
d. 2.32 m

Answers

Answer:

\(\triangle h=4.935m\)

Explanation:

From the question we are told that:

Liquid density \(\rho=800\)

Diameter of pipe \(d=4cm \approx 0.004m\)

Diameter of venture \(d=10cm \approx 0.010m\)

Specific weight of mercury P_mg \(133 kN/m^3\)

Flow rate \(r=0.05 m^3/s\)

Area A:

            \(A_1=\frac{\pi}{4}0.1^2\\A_1=0.00785m^2\\A_2=\frac{\pi}{4}0.04^2\\A_2=0.001256m^2\\\)

Generally the Bernoulli's equation is mathematically given by

\(\frac{P_1}{\rho_1g}+\frac{V_1^2}{2g}=\frac{P_2}{\rho g}+\frac{V_2^2}{2g}\\\)

Where

\(V_1=\frac{r}{A_1} \\\\ &V_1=\frac{r}{A_2}\)

Therefore

\(P_1-P_2=\frac{Pr^2}{2}(\frac{A_1^2-A_2^2}{A_1^2A_2^2})\)

Generally the equation for pressure difference b/w manometer fluid is given as

\(P_1-P_2=(p_mg-pg)\triangle h\)

Therefore

\((p_mg-pg)\triangle h=\frac{Pr^2}{2}(\frac{A_1^2-A_2^2}{A_1^2A_2^2})\)

\(\triangle h=\frac{\frac{Pr^2}{2}(\frac{A_1^2-A_2^2}{A_1^2A_2^2})}{(p_mg-pg)}\)

\(\triangle h=\frac{\frac{(800)(0.05)^2}{2}(\frac{(0.1)^2-(0.4)^2}{(0.1)^2(0.04)^2})}{(1.33*10^3-800*9.81)}\)

\(\triangle h=4.935m\)

Therefore elevation change is mathematically given by

\(\triangle h=4.935m\)

1. Purpose: Apply various algorithm design strategies to solve a problem, practice formulating and analyzing algorithms, implement an algorithm. In the US, coins are minted with denominations of 50, 25, 10, 5, and 1 cent. An algorithm for making change using the smallest possible number of coins repeatedly returns the biggest coin smaller than the amount to be changed until it is zero. For example, 17 cents will result in the series 10 cents, 5 cents, 1 cent, and 1 cent.
a) (4 points) Give a recursive algorithm that generates a similar series of coins for changing n cents. Don’t use dynamic programming for this problem.
b) (4 points) Write an O(1) (non-recursive!) algorithm to compute the number of returned coins.
c) (1 point) Show that the above greedy algorithm does not always give the minimum number of coins in a country whose denominations are 1, 6, and 10 cents.
d) (6 points) Given a set of arbitrary denominations C =(c1,...,cd), describe an algorithm that uses dynamic programming to compute the minimum number of coins required for making change. You may assume that C contains 1 cent, that all denominations are different, and that the denominations occur in in increasing order.

Answers

Answer:

Explanation:a) Recursive algorithm for generating a series of coins for changing n cents:

arduino

Copy code

function makeChange(n):

   if n == 0:

       return []

   for coin in [50, 25, 10, 5, 1]:

       if coin <= n:

           return [coin] + makeChange(n - coin)

This algorithm recursively finds the largest coin smaller than the remaining amount and adds it to the list of coins. It continues this process until the remaining amount becomes zero. The algorithm iterates through the coin denominations in descending order to prioritize using the largest possible coins first.

b) O(1) algorithm to compute the number of returned coins:

arduino

Copy code

function countCoins(n):

   count = 0

   for coin in [50, 25, 10, 5, 1]:

       count += n // coin

       n %= coin

   return count

This algorithm uses a loop to iterate through the coin denominations and counts how many times each coin can be used to change the amount. It performs integer division (//) to determine the number of coins of each denomination and updates the remaining amount (n) using the modulus operator (%). The final count represents the total number of coins used.

c) The greedy algorithm for making change does not always provide the minimum number of coins when the denominations are 1, 6, and 10 cents. A counterexample is changing 12 cents. The greedy algorithm would return 10 cents and two 1 cents, totaling three coins. However, the optimal solution is two 6 cents coins, which requires only two coins. This counterexample demonstrates that the greedy algorithm may not consider all possible combinations and can lead to suboptimal results.

d) Dynamic programming algorithm for computing the minimum number of coins required for making change with arbitrary denominations:

less

Copy code

function minCoins(denominations, amount):

   dp = [infinity] * (amount + 1)

   dp[0] = 0

   for coin in denominations:

       for i in range(coin, amount + 1):

           dp[i] = min(dp[i], dp[i - coin] + 1)

   return dp[amount]

This algorithm uses dynamic programming to solve the problem. It creates a list dp of size amount + 1 to store the minimum number of coins required for each value from 0 to the target amount. It initializes all entries in dp with infinity except for the first entry, which is set to 0. Then, it iterates through each coin denomination and updates dp by considering the minimum between the current value and the value obtained by subtracting the coin denomination and adding 1. The final result is stored in dp[amount], which represents the minimum number of coins needed to make change for the given amount using the provided denominations.

Learn more about dynamic programming algorithms for coin change problems here:

https://brainly.com/question/29971423

#SPJ11

Help, quick please. I need help with my engineering word problem

Help, quick please. I need help with my engineering word problem

Answers

Answer:

a

Explanation:

The answer is The first one A

under dc conditions, find the energy stored in the capacitors in fig. 6.13. answer: 20.25 mj, 3.375 mj. p

Answers

Energy stored in capacitors under DC conditions in Fig. 6.13 is 20.25 MJ and 3.375 MJ.

To calculate the energy stored in the capacitors, we need to use the formula: E = 1/2 * C * V^2, where E is the energy, C is the capacitance, and V is the voltage across the capacitor.

In Fig. 6.13, we have multiple capacitors connected in parallel or series. To find the total energy stored, we first calculate the energy stored in each capacitor separately and then sum them up.

Let's assume the capacitances of the capacitors in the figure are C1, C2, and C3, and the voltages across them are V1, V2, and V3, respectively.

The energy stored in each capacitor is calculated as follows:

Energy in C1 = 1/2 * C1 * V1^2

Energy in C2 = 1/2 * C2 * V2^2

Energy in C3 = 1/2 * C3 * V3^2

Finally, we can find the total energy by summing up the individual energies:

Total energy = Energy in C1 + Energy in C2 + Energy in C3

By performing the calculations, we obtain the values of 20.25 MJ and 3.375 MJ for the energy stored in the capacitors in Fig. 6.13.

Know more about capacitors here:

https://brainly.com/question/17176550

#SPJ11

Let x and be positive integers, with x < n, gcd(x, ) = 1.
What is the value of each of the following? Give a short justification for each. (For example, you can state the theorem that justifies your answer.)
x^(phi()) mo
x^(phi()−1) mo
x^(phi()+1) mo

Answers

x^(phi(n)) mod n = 1

x^(phi(n)-1) mod n is the modular inverse of x modulo n

x^(phi(n)+1) mod n = x mod n

The values of the expressions x^(phi(n)) mod n, x^(phi(n)-1) mod n, and x^(phi(n)+1) mod n can be determined using Euler's theorem and modular arithmetic.

x^(phi(n)) mod n:

By Euler's theorem, if x and n are coprime (gcd(x, n) = 1), then x^(phi(n)) is congruent to 1 modulo n. Therefore, x^(phi(n)) mod n is equal to 1.

x^(phi(n)-1) mod n:

Similar to the previous case, x^(phi(n)-1) mod n is congruent to x^(-1) mod n. If x and n are coprime, the modular inverse of x exists modulo n. Therefore, x^(phi(n)-1) mod n is equal to the modular inverse of x modulo n.

x^(phi(n)+1) mod n:

In this case, we can rewrite x^(phi(n)+1) as (x * x^(phi(n))) mod n. Since we already know that x^(phi(n)) mod n is 1 (as shown in case 1), this expression simplifies to (x * 1) mod n, which is equivalent to x mod n.

Know more about modular inverse here;

https://brainly.com/question/31496955

#SPJ11

Members AB and BC of the truss shown are made of the same alloy. It is known that a 20-mm-square bar of the same alloy was tested to failure and that an ultimate load of 120 kN was recorded. If a factor of safety of 3.2 is to be achieved for both bars, determine the required cross-sectional area of (a) bar 1.4m AB, (b) bar AC.

Members AB and BC of the truss shown are made of the same alloy. It is known that a 20-mm-square bar

Answers

The required cross-sectional area of both bars AB and AC is 125000 mm^2.

How did we get the value?

To determine the required cross-sectional area of bars AB and AC, we need to calculate the maximum load that each bar can withstand with a factor of safety of 3.2, and then use the maximum load to calculate the cross-sectional area.

First, let's consider bar AB. We can analyze the forces acting on the truss to find the maximum load on bar AB. Since the truss is in static equilibrium, the sum of the forces in the x and y directions must be zero. In the y direction, we have:

F_AB + F_BC = W

where F_AB and F_BC are the forces acting on bars AB and BC, respectively, and W is the weight acting downwards at the joint C. Since the truss is symmetric, we can assume that F_AB = F_BC.

Therefore,

F_AB = W/2 = (1000 kg)(9.81 m/s^2)/2 = 4905 N

To find the maximum load that bar AB can withstand with a factor of safety of 3.2, we can use the formula:

maximum load = ultimate load / factor of safety

maximum load = 120 kN / 3.2 = 37.5 kN = 37500 N

Now we can use the maximum load to calculate the required cross-sectional area of bar AB:

maximum stress = maximum load / cross-sectional area

From the stress-strain curve of the alloy, we can assume that the ultimate stress is equal to the yield stress, since the bar will deform plastically beyond the yield stress. Let's assume that the yield stress of the alloy is 300 MPa.

maximum stress = 37500 N / cross-sectional area <= 300 MPa

cross-sectional area >= 37500 N / 300 MPa = 0.125 m^2

Therefore, the required cross-sectional area of bar AB is:

cross-sectional area = 0.125 m^2 = 125000 mm^2

For bar AC, we can repeat the same analysis to find the maximum load and then the required cross-sectional area. Since bar AC is inclined at an angle of 45 degrees, we need to resolve the forces into components in the x and y directions. We have:

F_AC = W/sin(45) = (1000 kg)(9.81 m/s^2)/sin(45) = 6945 N

maximum load = 120 kN / 3.2 = 37.5 kN = 37500 N

maximum stress = 37500 N / cross-sectional area <= 300 MPa

cross-sectional area >= 37500 N / 300 MPa = 0.125 m^2

Therefore, the required cross-sectional area of bar AC is:

cross-sectional area = 0.125 m^2 = 125000 mm^2

So the required cross-sectional area of both bars AB and AC is 125000 mm^2.

learn more about cross-sectional area: https://brainly.com/question/31248718

#SPJ1

Chlorine is one of the important commodity chemicals for the global economy. Before the advent of large scale
production of chlorine from electro-chemical processes, the direct catalytic oxidation of hydrochloric acid with oxygen
is used to produce chlorine. It is known as ‘Deacon process’
In production of chlorine gas by oxidation of hydrochloric acid gas, air is used 30% excess of the theoretically used.
4kmol/h of hydrochloric acid is fed to the reactor. The percentage conversion of reaction is 80%.
Reaction: 4 HCL + O2 −−→ 2 Cl2 + 2 H2O
a Calculate the composition of gas in the product stream on mole basis

Answers

The composition of gas in the feed, the percentage conversion and the

theoretical yield are combined to give the product stream composition.

Response:

The composition of gas in the product stream are;

HCl: 0.4 kmol/h, Cl₂: 1.6 kmol/h, H₂O: 1.6 kmol/h, O₂: 0.5 kmol/h

How can percentage conversion give the contents of the product stream?

The amount of oxygen used = 30% exceeding the theoretical amount

Number of moles of hydrochloric acid = 4 kmol/h

Percentage conversion = 80%

Required:

The composition of the gas in the product feed.

Solution;

The given reaction is; 4HCl + O₂ \(\longrightarrow\) 2Cl₂ + 2H₂O

\(Percentage \ conversion = \mathbf{ \dfrac{Moles \ of \ limiting \ reactant \ reacted}{Moles \ of \ limiting \ reactant \ supplied \ in \ the \, feed}}\)

Which gives;

\(80 \% = \mathbf{ \dfrac{Moles \ of \ limiting \ reactant \ reacted}{4 \, kmol/h}}\)

Moles of limiting reactant reacted = 4 kmol/h × 0.80 = 3.6 kmol/h

Which gives;

Number of moles of HCl in the stream = 4 kmol/h - 3.6 kmol/h = 0.4 kmol/h

Number of moles of Cl₂ produced = 2 kmol/h × 0.8 = 1.6 kmol/h

Similarly;

Number of moles of H₂O produced = 2 kmol/h × 0.8 = 1.6 kmol/h

Number of moles of O₂ in the product stream = 30% × 1 kmol/h + 20% × 1 kmol/h = 0.5 kmol/h

The composition of the production stream is therefore;

HCl: 0.4 kmol/hCl₂: 1.6 kmol/hH₂O: 1.6 kmol/hO₂: 0.5 kmol/h

Learn more about theoretical and actual yield here:

https://brainly.com/question/14668990

https://brainly.com/question/82989

Other Questions
Problem 2-19A (Algo) Context-sensitive nature of cost behavior classifications LO 2-1 Thornton Bank's start-up division establishes new branch banks. Each branch opens with three tellers. Total teller cost per branch is $99,000 per year. The three tellers combined can process up to 85,000 customer transactions per year. If a branch does not attain a volume of at least 55,000 transactions during its first year of operations, it is closed. If the demand for services exceeds 85,000 transactions, an additional teller is hired and the branch is transferred from the start-up division to regular operations. Required a. What is the relevant range of activity for new branch banks? b. Determine the amount of teller cost in total and the average teller cost per transaction for a branch that processes 55,000,65,000, 75,000 , or 85,000 transactions. In this case (the activity base is the number of transactions for a specific branch), is the teller cost a fixed or a variable cost? c. Determine the amount of teller cost in total and the average teller cost per branch for Thornton Bank, assuming that the start-up division operates 20,25,30 or 35 branches. In this case (the activity base is the number of branches), is the teller cost a fixed or a variable cost? You are baking chocolate chip cookies. One batch makes 6 dozen big cookies. The recipe calls for 3/4 cup brown sugar. How many cups of brown sugar would you need it you wanted to make 13 dozen cookies? The domain and the range of the reciprocal function are the set of all real numbers. True or false?. Select the correct answer.31,53If the point3 is on the unit circle, what is x? You own a bond that pays $64 in interest annually. The face value is $1,000 and the current market price is $1,021.61. The bond matures in 11 years. What is the yield to maturity? 5.80 percent 6.46 percent 6.12 percent 6.71 percent 6.22 percent can anyone help me solve these please ? Martes es maana. Qu da fue anteayer? why did they chose february for black history month Which are solutions for the following inequality?Select ALL that apply.4(2x+5)40-310-5-103 adding a public key to .ssh/authorized keys is one way a hacker can retain access to the site after discovering a vulnerability the value of y varies directly with x. which function represents the relationship between x and y if y=6 and x-9? regulations for the purpose of creating greater wealth for the country as a whole corresponds with which of the following reasons for why the government is involved in businesses?A) benefit of societyB) safety of publicC) protection of industryD) improvement of market .The way music influences our mentality. What structures are encountered by a light stimulus as it enters the eye? Repetition, practice, collaborative learning, and explicit instruction in English vocabulary all contribute to discuss the process of providing corrective feedback and identify the problems created by modern social media at work 2 Cl2 + 4 NaOH = 3 NaCl + 1 NaClO2 + 2 H2O;11.9 g Cl2 is reacted with 12.0 g NaOH. Determine which is the limiting reactant. Name and discuss two way in which a student can pay for his or her studies if their parents can't afford it? quadrilateral ABCD is a kita with diagonals AC and BD. determine the area of a kita with diagonals BD = 8 units and AC = 12 units When were the ports of Venezuela closed?during World War Iduring the Spanish regimeduring the dictatorshipsduring the period of piracy