Answer:
//Program is written in C++ language
// Comments explains difficult lines
#include<iostream>
using namespace std;
int main (){
//Variable declaration
double price, shipping;
cout<<"Item Price: ";
cin>>price;
//Test price for shipping fee
shipping = 0; //Initialise shipping fee to 0 (free)
if(price <100)
{
shipping = 0.2 * price;
}
//The above if statement tests if item price is less than 100.
//If yes, then the shipping fee is calculated as 20% of the item price
//Else, (if item price is at least 100), shipping fee is 0, which means free
if(shipping != 0)
{
cout<<"Shipping fee is "<<shipping;
}
else
{
cout<<"Item will be shipped for free";
}
return 0;
}
An AM radio transmitter radiates 550 kW at a frequency of 740 kHz. How many photons per second does the emitter emit?
Answer:
1121.7 × 10³⁰ photons per second
Explanation:
Data provided in the question:
Power transmitted by the AM radio,P = 550 kW = 550 × 10³ W
Frequency of AM radio, f = 740 kHz = 740 × 10³ Hz
Now,
P = [tex]\frac{NE}{t}[/tex]
here,
N is the number of photons
t is the time
E = energy = hf
h = plank's constant = 6.626 × 10⁻³⁴ m² kg / s
Thus,
P = [tex]\frac{NE}{t}[/tex] = [tex]\frac{N\times(6.626\times10^{-34}\times740\times10^{3})}{1}[/tex] [t = 1 s for per second]
or
550 × 10³ = [tex]\frac{N\times(6.626\times10^{-34}\times740\times10^{3})}{1}[/tex]
or
550 = N × 4903.24 × 10⁻³⁴
or
N = 0.11217 × 10³⁴ = 1121.7 × 10³⁰ photons per second
The number of photons that are emitted by this AM radio transmitter is equal to [tex]1.12 \times 10^{33}\;photons.[/tex]
Given the following data:
Power = 550 kW.Frequency = 740 kHz.Scientific data:
Planck constant = [tex]6.626 \times 10^{-34}\;J.s[/tex]How to calculate the number of photons.In order to determine the number of photons that are being emitted by this AM radio transmitter, we would solve for the quantity of energy it consumes by using Planck-Einstein's equation.
Mathematically, the Planck-Einstein relation is given by the formula:
[tex]E = hf[/tex]
Where:
h is Planck constant.f is photon frequency.Substituting the given parameters into the formula, we have;
[tex]E = 6.626 \times 10^{-34}\times 740 \times 10^3\\\\E = 4.903 \times 10^{-28}\;Joules.[/tex]
For the number of photons:
[tex]n=\frac{Power}{Energy} \\\\n=\frac{550 \times 10^3}{4.903 \times 10^{-28}} \\\\n=1.12 \times 10^{33}\;photons.[/tex]
Read more on photon frequency here: https://brainly.com/question/9655595
The winch on the truck is used to hoist the garbage bin onto the bed of the truck. If the loaded bin has a weight of 8500 lb and center of gravity at G, determine the force in the cable needed to begin the lift. The coefficients of static friction at A and B are ,MuA = 0.2 And MuB = 0.3 respectively. Neglect the height of the Support at A.
Answer:
T = 3600 lb
Explanation:
Given:
- coefficient of static friction @a u_a = 0.2
- coefficient of static friction @b u_b = 0.3
- Weight of the loaded bin W = 8500 lb
Find:
- Find the force in the cable needed to begin the lift.
Solution:
- Draw the forces on the diagram. see attachment.
- Take sum of moments about point B as zero:
(M)_b = W*12 - N_a * 22 = 0
N_a = W*12 / 22 = 8500*12 / 22
N_a = 4636.364 lb
- Compute friction force F_a @ point A:
F_a = u_a*N_a = 4636.364*0.2
F_a = 927.2727 lb
- Take sum of moments about point A as zero:
-W*10 - F_b*sin(30)*22+ 22*N_b*cos(30) + 22*T*sin(30) = 0
Where, F_b = u_b*N_b = N_b*0.3
Hence, -85000 - 3.3*N_b + 11sqrt(3)*N_b + 11 T = 0
15.753*N_b + 11*T = 85000 ...... 1
- Take sum of forces in x-direction equal to zero:
T*cos(30) - N_b*sin(30) - u_b*N_b*cos(30) - F_a = 0
T*cos(30) - 0.75981*N_b = 927.2727 ..... 2
- Solve two equation simultaneously:
T = 3600 lb , N_b = 2882 lb
Based on the graphs of stress-strain from the V-MSE site, how would you characterize the general differences between polymers and alloys in terms of mechanical properties?
a. Alloys are stronger, stiffer, but less ductile.
b. Polymers have a higher toughness.
c. Alloys have lower Young’s Modulus.
d. The properties overlap so you can’t really make any general statements.
Answer:
Option A
Explanation:
Alloys are metal compounds with two or more metals or non metals to create new compounds that exhibit superior structural properties. Alloys have high level of hardness that resists deformation thereby making it less ductile compared to polymers. This is due to the varying difference in the chemical and physical characteristics of the constituent metals in the alloy.
Compute the number of kilo- grams of hydrogen that pass per hour through a 6-mm-thick sheet of palladium having an area of 0.25 m^2 at 600°C. Assume a diffusion coefficient of 1.7 x 10^8 m^2/s, that the concentrations at the high- and low-pressure sides of the plate are 2.0 and 0.4 kg of hydrogen per cubic meter of palladium, and that steady-state conditions have been attained.
Answer:
The number of kilo- grams of hydrogen that pass per hour through this sheet of palladium is [tex]4.1 * 10^{-3} \frac{kg}{h}[/tex]
Explanation:
Given
x1 = 0 mm
x2 = 6 mm = 6 * [tex]10^{-3}[/tex] m
c1 = 2 kg/[tex]m^{3}[/tex]
c2 = 0.4 kg/[tex]m^{3}[/tex]
T = 600 °C
Area = 0.25 [tex]m^{2}[/tex]
D = 1.7 * [tex]10^{8} m^{2}/s[/tex]
First equation
J = - D [tex]\frac{c1 - c2}{x1 - x2}[/tex]
Second equation
J = [tex]\frac{M}{A*t}[/tex]
To find the J (flux) use the First equation
J = - 1.7 * [tex]10^{8} m^{2}/s[/tex] * [tex]\frac{2 kg/m^{3} - 0.4 kg/m^{3}}{0 - 6 * 10^{-3} } = 4.53 * 10^{-6} \frac{kg}{m^{2}s }[/tex]
To find M use the Second equation
[tex]4.53 * 10^{-6} \frac{kg}{m^{2}s}[/tex] = [tex]\frac{M}{0.25 m^{2} * 3600s/h}[/tex]
M = [tex]4.1 * 10^{-3} \frac{kg}{h}[/tex]
Consider the following incomplete code segment, which is intended to print the sum of the digits in num. For example, when num is 12345, the code segment should print 15, which represents the sum 1 + 2 + 3 + 4 + 5.
int num = 12345;
int sum = 0;
/* missing loop header */
{
sum += num % 10;
num /= 10;
}
System.out.println(sum);
Which of the following should replace /* missing loop header */ so that the code segment will work as intended?
while (num > 0)
A
while (num >= 0)
B
while (num > 1)
C
while (num > 2)
D
while (num > sum)
E
Answer:
A) while (num >= 0)
Explanation:
To understand why we need to focus on the module and division operation inside the loop. num % 10 divide the number by ten and take its remainder to then add this remainder to sum, the important here is that we are adding up the number in reverse order and wee need to repeat this process until we get the first number (1%10 = 1), therefore, num need to be one to compute the last operation.
A) this is the correct option because num = 1 > 0 and the last operation will be performed, and after the last operation, num = 1 will be divided by 10 resulting in 0 and 0 is not greater than 0, therefore, the cycle end and the result will be printed.
B) This can not be the option because this way the program will never ends -> 0%10 = 0 and num = 0/10 = 0
C) This can not be the option because num = 1 > 1 will produce an early end of the loop printing an incomplete result
D) The same problem than C
E) There is a point, before the operations finish, where sum > num, this will produce an early end of the loop, printing an incomplete result
Loops are program statements that are used to carry out repetitive and iterative operations
The missing loop header is (a) while (num > 0)
To calculate the sum of the digits of variable num, the following must be set to be true
The loop header must be set to keep repeating the loop operations as long as the value of variable num is more than 0
To achieve this, we make use of while loop,
And the loop condition (as described above) would be num > 0
Hence, the true option is (a) while (num > 0)
Read more about loops at:
https://brainly.com/question/19344465
What are the purposes of the various types of drawings used for the design and erection of steel framed buildings?
Answer:
The main purpose the various types of drawing used for the design and erection of steel framed buildings is to successfully construct a solid and strong building
Explanation:
The main purpose the various types of drawing used for the design and erection of steel framed buildings is to successfully construct a solid and strong buildings.
Steel forms the skeleton of a building, essentially the part of the building that holds everything up and together. Steel has so many advantages when compared to other structural building material such as concrete, plastic, timber and composite materials.
The stiffness of an axially loaded round bar is ______ and its flexibility is ______. The stiffness of torsionally loaded round bar is_______ and its flexibility is_______.
Answer:
The stiffness of an axially loaded bar is (EA)/L
The flexibility of an axially loaded bar is L/(EA)
The stiffness of a torsionally loaded round bar is (GJ)/L
The flexibility of a torsionally loaded round bar is L/(GJ)
Explanation:
For axially loaded round bar, ExA measures, what is known as, the axial rigidity of the round bar. "E" is defined as the Young's modulus which is the property of the bar that measures the stiffness of the bar itself and is meausred in Pascals. A is the area of the cross section of the bar. L is the entire length of the bar. Multiple the Young's modulus with the cross sectional area and divide the value by the length which will give the stiffness of the axially loaded bar. The inverse of this equation will give you the flexibility.
For a Torsionally loaded round bar, the formula is a bit different. G is the modulus rigidity of the bar and J is the Torsional constant. GJ is calculated by multiplying the applied torque with the length od the bar and dividing the result by the angle of the twist. Dividing the result by the length will give the stiffness. Inverse of the equation measuring stiffness gives the flexibility
An electric field is expressed in rectangular coordinates by E = 6x2ax + 6y ay +4az V/m.Find:a) VMN if point M and N are specified by M(2,6,1) and N(-3, -3, 2).b) VM if V = 0 at Q(4, -2, -35)c) VN if V = 2 at P(1,2,4).Please show all steps
Answer:
a.) -147V
b.) -120V
c.) 51V
Explanation:
a.) Equation for potential difference is the integral of the electrical field from a to b for the voltage V_ba = V(b)-V(a).
b.) The problem becomes easier to solve if you draw out the circuit. Since potential at Q is 0, then Q is at ground. So voltage across V_MQ is the same as potential at V_M.
c.) Same process as part b. Draw out the circuit and you'll see that the potential a point V_N is the same as the voltage across V_NP added with the 2V from the other box.
Honestly, these things take practice to get used to. It's really hard to explain this.
The values of the potential differences for the three questions are;
A) [tex]V_{MN} = -147 V[/tex]
B) [tex]V_{MQ}[/tex] = -120 V
C) [tex]V_{N} = 51 V[/tex]
We are given the expression of the electric field as;
E = (6x² x^ + 6y y^ +4 z^) V/m
A) We want to find the potential difference between point M and N with coordinates M(2,6,1) and N(-3, -3, 2).[tex]V_{MN} = -\int\limits^M_N {E} \, dx[/tex]
Integrating this with the M and N coordinates as boundaries in mind gives;
[tex]V_{MN} = -[6\frac{x^{3}}{3} + 6\frac{y^{2}}{2} + 4z]^{2,6,1}_{-3,-3,2}[/tex]
[tex]V_{MN} = -[2{x^{3} + 3y^{2} + 4z]^{2,6,1}_{-3,-3,2}[/tex]
Plugging in those boundary values and solving using an online integral calculator gives;
[tex]V_{MN} = -147 V[/tex]
B) We are told that V = 0 at Q(4, -2, -35). Thus potential difference between point M and Q is;[tex]V_{MQ} = -[6\frac{x^{3}}{3} + 6\frac{y^{2}}{2} + 4z]^{2,6,1}_{4,-2,-35}[/tex]
[tex]V_{MQ} = -[2{x^{3} + 3y^{2} + 4z]^{2,6,1}_{4,-2,-35}[/tex]
Plugging in those boundary values and solving using an online integral calculator gives;
[tex]V_{MQ}[/tex] = -120 V
C) We are told that V = 2 at P(1,2,4). Thus potential difference between point V and N is;
[tex]V_{NP} = -[6\frac{x^{3}}{3} + 6\frac{y^{2}}{2} + 4z]^{-3,-3,2}_{1,2,4}[/tex]
[tex]V_{NP} = -[2{x^{3} + 3y^{2} + 4z]^{-3,-3,2}_{1,2,4}[/tex]
Plugging in those boundary values and solving using an online integral calculator gives; [tex]V_{NP} = 49 V[/tex]
Thus;
[tex]V_{N} = V + V_{NP}[/tex]
[tex]V_{N}[/tex] = 2 + 49
[tex]V_{N} = 51 V[/tex]
Read more about Electric field vectors at; https://brainly.com/question/13193669
Calculate the change in enthalpy of 1.94 mol of PbO(s) if it is cooled from 732 K to 234 K at constant pressure.
Complete question:
The heat capacity of solid lead oxide is given by Cp,m=44.35+1.47×10⁻³T/K in units of J K−1 mol−1.
Calculate the change in enthalpy of 1.94 mol of PbO(s) if it is cooled from 732 K to 234 K at constant pressure.
Answer:
The change in enthalpy of PbO(s) is -39.488 x10³J
Explanation:
Given:
Initial temperature of PbO(s) (T₁) = 732 K
Final temperature of PbO(s) (T₂) = 234 K
[tex]\delta H = n\int\limits^{T_2}_{T_1} {C_p m} \, dT[/tex]
where;
Cp,m is the specific heat capacity of PbO(s)
[tex]\delta H = 1.94 molX\int\limits^{234}_{732} {[44.35 +1.47 X10^{-3}\frac{T}{K} ]} \,d (\frac{T}{K})[/tex]
[tex]\delta H = 1.94 molX {[44.35 (234-732) +1.47 X10^{-3}(\frac{234^2 -732^2}{2}) ]}[/tex]
= 1.94mol [(-19957.5)+(-396.9)]
= -38717.55 J -769.986J
= -39487.536 J
ΔH = -39.488 x10³J
Therefore, the change in enthalpy of PbO(s) is -39.488 x10³J
A three-phase line with an impedance of (0.2 1 j1.0) Ω /phase feeds three balanced three-phase loads connected in parallel. Load 1: Absorbs a total of 150 kW and 120 kvar. Load 2: Delta connected with an impedance of (150 2 j48) Ω /phase. Load 3: 120 kVA at 0.6 PF leading. If the line-to-neutral voltage at the load end of the line is 2000 v (rms), determine the magnitude of the line-to-line voltage at the source end of the line.
Answer:
Source voltage (L-L) = 3479.50<2.13 V (in polar form)
Source voltage (L-L) = 3477.1 + j129.57 V (rectangular form)
Given Information:
A 3 phase source is feeding three loads connected in parallel.
Load voltage (L-N) = VLoad = 2000 V
Impedance of line = ZLine = 0.2 + j1.0 Ω
Load 1 = S1 = P + jQ = 150 + j120 kVA
Load 2 = S2 = Delta connected with Z2 = 150 - j48 Ω
Load 3 = S3 = 120 KVA at PF = 0.6 leading
Source voltage (L-L) = ?
Explanation:
The source voltage is = VLoad + total current*(ZLine)
Where total current is = I1 + I2 + I3
Lets first find current flowing in each of the loads
Load 1:
3 phase apparent power is given S1 = 150 + j120 kVA
Convert into per phase by diving by 3
S1 = (150 + j120)/3
S1 = 50 + j40 kVA
As we know, S = V1* (where * is the conjugate)
I1 = S1*/VLoad
I1 = (50,000 - j40,000)/2000 (notice minus sign due to conjugate)
I1 = 25 - j20 A
Load 2:
first convert delta impedance into wye by the relation
Zy = Zdelta/3
Zy = (150 - j48)/3
Zy = 50 - j16 Ω
I2 = V/Zy
I2 = 2000/(50 - j16)
I2 = 36.29 + j11.61 A
Load 3:
apparent power = 120 KVA
PF = cos(θ) = 0.6 leading
As we know, P = S*cos(θ) and Q = S*sin(θ)
θ = cos⁻¹(PF) = cos⁻¹(0.6) = 53.13°
P3 = 120*cos(53.13°) = 72 kW
Q3 = 120*sin(53.13°) = 96 kVAR
S3 = 72 + j96 kVA
Convert into per phase by diving by 3
S3 = (72 - 96)/3 (minus sign due to leading PF)
S3 = 24 - j32 kVA
I3 = S3*/VLoad
I3 = (24,000 + j32,000)/2000
I3 = 12 + j16 A
Total current = I1 + I2 + I3
Total current = (25 - j20) + (36.29) + j11.61) + (12 + j16)
Total current = 73.29 + j7.61
Source voltage (L-N) = VLoad + total current*(ZLine)
Source voltage (L-N) = 2000 + (73.29 + j7.61)*(0.2 + j1.0)
Source voltage (L-N) = 2007.05 + j74.81
Source voltage (L-L) = [tex]\sqrt{3}[/tex]*Source voltage (L-N)
Source voltage (L-L) = [tex]\sqrt{3}[/tex] (2007.05 + j74.81)
Source voltage (L-L) = 3477.1 + j129.57 V
Source voltage (L-L) = 3479.50<2.13 V (in polar form)
An engine has a hot-reservoir temperature of 970 K and a cold-reservoir temperature of 480 K. The engine operates at three-fifths maximum efficiency. What is the efficiency of the engine?
Answer:
[tex]\eta=0.303[/tex]
Explanation:
Given that
Temperature of the hot reservoir ,T₁ = 970 K
Temperature of the cold reservoir ,T₂ = 480 K
We know that only Carnot engine is the ideal engine which gives us the maximum power.The efficiency of Carnot engine is given as
[tex]\eta_{max}=1-\dfrac{T_2}{T_1}[/tex]
[tex]\eta_{max}=1-\dfrac{480}{970}[/tex]
[tex]\eta_{max}=0.505[/tex]
Therefore the efficiency of the given engine will be
[tex]\eta=\dfrac{3}{5}\eta_{max}[/tex]
[tex]\eta=\dfrac{3}{5}\times 0.505[/tex]
[tex]\eta=0.303[/tex]
Decide how the sketches below would be listed, if they were listed in order of decreasing force between the charges. That is, select "1" beside the sketch with the strongest force between the charges, select "2" beside the sketch with the next strongest force between the charges, and so on.
Answer:
box 2=highest
box3= 2
box 1=3
box 4=lowest
Explanation:
Decide how the sketches below would be listed, if they were listed in order of decreasing force between the charges. That is, select "1" beside the sketch with the strongest force between the charges, select "2" beside the sketch with the next strongest force between the charges, and so on.
take note that like charges repel while unlike charges attract
from the law of electric attraction, we know that
f=kQq/r^2
force is directly proportional to the charges,
-3-1= has the highest force of repulsion
the first bos, the balls are -2-1=-3 they are repulsive
second box=-3-1=-4
third box=-3-1=-4
fourth=-1-1=-2
box 2=highest
box3= 2
box 1=3
box 4=lowest
The current entering the positive terminal of a device is i(t)= 6e^-2t mA and the voltage across the device is v(t)= 10di/dtV.
( a) Find the charge delivered to the device between t=0 and t=2 s.
( b) Calculate the power absorbed.
( c) Determine the energy absorbed in 3 s.
Answer:
a) 2,945 mC
b) P(t) = -720*e^(-4t) uW
c) -180 uJ
Explanation:
Given:
i (t) = 6*e^(-2*t)
v (t) = 10*di / dt
Find:
( a) Find the charge delivered to the device between t=0 and t=2 s.
( b) Calculate the power absorbed.
( c) Determine the energy absorbed in 3 s.
Solution:
- The amount of charge Q delivered can be determined by:
dQ = i(t) . dt
[tex]Q = \int\limits^2_0 {i(t)} \, dt = \int\limits^2_0 {6*e^(-2t)} \, dt = 6*\int\limits^2_0 {e^(-2t)} \, dt[/tex]
- Integrate and evaluate the on the interval:
[tex]= 6 * (-0.5)*e^-2t = - 3*( 1 / e^4 - 1) = 2.945 C[/tex]
- The power can be calculated by using v(t) and i(t) as follows:
v(t) = 10* di / dt = 10*d(6*e^(-2*t)) /dt
v(t) = 10*(-12*e^(-2*t)) = -120*e^-2*t mV
P(t) = v(t)*i(t) = (-120*e^-2*t) * 6*e^(-2*t)
P(t) = -720*e^(-4t) uW
- The amount of energy W absorbed can be evaluated using P(t) as follows:
[tex]W = \int\limits^3_0 {P(t)} \, dt = \int\limits^2_0 {-720*e^(-4t)} \, dt = -720*\int\limits^2_0 {e^(-4t)} \, dt[/tex]
- Integrate and evaluate the on the interval:
[tex]W = -180*e^-4t = - 180*( 1 / e^12 - 1) = -180uJ[/tex]
P1.30 shows a gas contained in a vertical piston– cylinder assembly. A vertical shaft whose cross-sectional area is 0.8 cm2 is attached to the top of the piston. Determine the magnitude, F, of the force acting on the shaft, in N, required if the gas pressure is 3 bar. The masses of thepiston and attached shaft are 24.5kg and 0.5kg respectively. The piston diameter is 10cm. The local atmospheric pressure is 1 bar. The piston moves smoothly in the cylinder and g=9.81 m/s2
In the process of analyzing a thermodynamic system it is important to identify what system is being worked on and the processes and properties if the system
The magnitude of the force acting on the shaft, is approximately 1,336.5 N
The reason the value for the force magnitude acting on the shaft is correct is as follows:
The known parameters are:
The cross-sectional area of the shaft, Aₐ = 0.8 cm²
The required gas pressure in the cylinder, P = 3 bar
The mass of the piston, m₁ = 24.5 kg
The mass of the shaft, m₂ = 0.5 kg
The diameter of the piston, D = 10 cm
The atmospheric pressure, Pₐ = 1 bar
Required:
The magnitude of the force F acting on the shaft
Solution:
The force due to the gas in the cylinder, [tex]\mathbf{F_{gas}}[/tex], is given as follows;
[tex]F_{gas}[/tex] = 3 bar × π × (10 cm)²/4 = 2,359.19449 N
The force due to the atmosphere, [tex]\mathbf{F_{atm}}[/tex], is given as follows;
[tex]F_{atm}[/tex] = 1 bar × ((π × (10 cm)²/4) - 0.8 cm²) ≈ 777.4 N
The force due to the piston and shaft, [tex]\mathbf{F_{ps}}[/tex], is given as follows;
[tex]F_{ps}[/tex] = (24.5 kg + 0.5 kg) × 9.81 m/s² = 245.25 N
The magnitude of the force acting on the shaft, F = [tex]F_{gas}[/tex] - ([tex]\mathbf{F_{atm}}[/tex] + [tex]\mathbf{F_{ps}}[/tex])
∴ F = 2,359.19449 N - (777.4 N + 245.25 N) ≈ 1,336.5449 N
The magnitude of the force acting on the shaft, F ≈ 1,336.5 N
Learn more about forces due to pressure here:
https://brainly.com/question/4197598
Water is boiled at 1 atm pressure in a coffee maker equipped with an immersion-type electric heating element. The coffee maker initially contains 1 kg of water. Once boiling started, it is observed that half of the water in the coffee maker evaporated in 12 min. If the heat loss from the coffee maker is negligible, what is the power rating of the heating element?
Answer:
1.57 KW
Explanation:
given data:
P= 1 atm
T= 12 min
power rating=??
solution:
latent heat of vaporization (L) of water at 1 atm = 2257.5 KJ/Kg
half of the water is evaporated in 12 min
so power rating is,
=P×L/2.T
=1×2257.5 /2×12×60
=1.57 KW
Using Python, have your program do the following, using loops (no recursion)
1. Have the user repeatedly enter integers until they enter a negative number. At that point stop inputting and proceed to the output described in step two. Note: The negative number that terminates the input is not included in any of these results.
2. When the input is done, display the following if there was at least one valid (non -negative) number entered:
(a) The sum of the numbers entered in that loop
(b) How many numbers were entered
(c) The average of those numbers to two places (avoid integer division.)
(d) The lowest number input
(e) The highest number input
If there were no (valid) numbers entered, make sure your code displays the message "no valid numbers entered" (and avoids dividing by 0) instead of displaying a - e below.
Answer:
Explanation:
# taking first number
low = int(input("Enter a number: "))
# if that is valid
if low >= 0:
# considering it as high, sum and input
high = low
sum = low
count = 1
inp = low
# breaking if negative number is entered
while True:
# taking user input of numbers
inp = int(input("Enter a number: "))
if inp >= 0:
# adding it to sum
sum = sum + inp
# checking for low
if low > inp:
low = inp
# checking for high
if high < inp:
high = inp
# tracking count
count = count + 1
else:
break
# printing output
print("\nSum =",sum)
print("count =",count)
print("Average =",round(sum/float(count),2))
print("Lowest =",low)
print("Highest =",high)
# no valid numbers
else:
print("no valid numbers entered")
A bus travels the 100 miles between A and B at 50 mi/h and then another 100 miles between B and C at 70 mi/h.
The average speed of the bus for the entire 200-mile trip is:
a. More than 60 mi/h.
b. Equal to 60 mi/h.
c. Less than 60 mi/h.
Answer:
c. less than 60 mi/h
Explanation:
To calculate the average speed of the bus, we need to calculate the total distance traveled by the bus, as well as the total time of travel of the bus.
Total Distance Traveled = S = 100 mi + 100 mi
S = 200 mi
Now, for total time, we calculate the times for both speeds from A to b and then B to C, separately and add them.
Total Time = t = Time from A to B + Time from B to C
t = (100 mi)/(50 mi/h) + (100 mi)(70 mi/h)
t = 2 h + 1.43 h
t = 3.43 h
Now, the average speed of bus will be given as:
Average Speed = V = S/t
V = 200 mi/3.43 h
V = 58.33 mi/h
It is clear from this answer that the correct option is:
c. less than 60 mi/h
The average speed of the bus for the entire 200-mile trip is less than 60 mi/h (Option C)
How to determine the time from A to BDistance = 100 miles Speed = 50 mi/hTime =?Time = Distance / speed
Time = 100 / 50
Time = 2 h
How to determine the time from B to CDistance = 100 miles Speed = 70 mi/hTime =?Time = Distance / speed
Time = 100 / 70
Time = 1.43 h
How to determine the average speed Total distance = 200 milesTime from A to B = 2 hTime from B to C = 1.43 hTotal time = 2 + 1.43 = 3.43 hAverage speed =?Average speed = Total distance / total time
Average speed = 200 / 3.43
Average speed = 58.31 mi/h
Thus, we can conclude that the average speed is less than 60 mi/h
Learn more about speed:
https://brainly.com/question/680492
A rectangular swimming pool 50 ft long, 25 ft wide, and 10 ft deep is filled with water to a depth of 8 ft. Use an integral to find the work required to pump all the water out over the top. (Take as the density of water δ=62.4lb/ft3.)
The total work required to pump all the water out of the swimming pool over the top is 3,744,000 foot-pounds.
Define the Variables
The density of water,[tex]\( \delta \)[/tex], is 62.4 lb/ft³.
The pool's dimensions are 50 ft long (x-direction), 25 ft wide (y-direction), and filled to 8 ft deep (z-direction).
Setup the Integral
Volume of a slice of water at depth*:
The slice at depth zis a horizontal slice of water with thickness dz and area:
=50 x 25
= 1,250 ft².
Weight of the slice of water:
[tex]\[ dW = \delta \times \text{Volume} = 62.4 \times 1250 \times dz \text{ lb} \][/tex]
Height the water needs to be lifted:
The water at depth z needs to be lifted to the rim of the pool, which is 10 ft above the bottom. Thus, each slice is lifted 10 - zfeet.
Work to lift this slice of water:
[tex]\[ dU = dW \times \text{Height} = 62.4 \times 1250 \times (10 - z) \times dz \text{ ft-lb} \][/tex]
Integrate
To find the total work, integrate [tex]\( dU \)[/tex] from z = 0 to z = 8 ft (since the water depth is 8 ft):
[tex]\[ U = \int_0^8 62.4 \times 1250 \times (10 - z) \, dz \text{ ft-lb} \][/tex]
Calculate the Integral
[tex]\[ U = 62.4 \times 1250 \int_0^8 (10 - z) \, dz \][/tex]
Compute the integral:
[tex]\[ \int_0^8 (10 - z) \, dz = [10z - \frac{1}{2}z^2]_0^8 \\= [80 - \frac{1}{2}(64)] \\= 80 - 32 \\= 48 \][/tex]
[tex]\[ U = 62.4 \times 1250 \times 48 \\= 3,744,000 \text{ ft-lb} \][/tex]
Suppose you are implementing a relational employee database, where the database is a list of tuples formed by the names, the phone numbers and the salaries of the employees. For example, a sample database may consist of the following list of tuples:
[("John", "x3456", 50.1) ; ("Jane", "x1234", 107.3) ; ("Joan", "unlisted", 12.7)]
Note that I have written parentheses around the tuples to make them more readable, but the precedences of different operators in OCaml make this unnecessary.
Define a function
find_salary : ((string * string * float) list) -> string -> float
that takes as input a list representing the database and the name of an employee and returns his/her corresponding salary. Think also of some graceful way to deal with the situation where the database does not contain an entry for that particular name, explain it, and implement this in your code.
Define a function
find_phno : ((string * string * float) list) -> string -> string
that is like find_salary, except that it returns the phone number instead.
What I have so far:
let rec find_salary li nm =
let rec helper name s =
match li with
| [] -> 0.0
| (n, p, s) :: t -> if (name = n) then s
else
helper t name
Answer:
Explanation:
val db = ("John", "x3456", 50.1) :: ("Jane", "x1234", 107.3) ::
("Joan", "unlisted", 12.7) :: Nil
type listOfTuples = List[(String, String, Double)]
def find_salary(name: String) = {
def search(t: listOfTuples): Double = t match {
case (name_, _, salary) :: t if name == name_ => salary
case _ :: t => search(t)
case Nil =>
throw new Exception("Invalid Argument in find_salary")
}
search(db)
}
def select(pred: (String, String, Double) => Boolean) = {
def search(found: listOfTuples): listOfTuples = found match {
case (p1, p2, p3) :: t if pred(p1, p2, p3) => (p1, p2, p3) :: search(t)
case (p1, p2, p3) :: t if !pred(p1, p2, p3) => search(t)
case Nil => Nil
case _ => throw new Exception("Invalid Argument in select function")
}
search(db)
}
println("Searching the salary of 'Joan' at db: " + find_salary("Joan"))
println("")
val predicate = (_:String, _:String, salary:Double) => (salary < 100.0)
println("All employees that match with predicate 'salary < 100.0': ")
println("\t" + select(predicate) + "\n")
Light from a helium-neon laser (λ = 633 nm) illuminates two slits spaced 0.50 mm apart. A viewing screen is 2.5 m behind the slits. What is the spacing between two adjacent bright fringes?
The spacing between two adjacent bright fringes, when a helium-neon laser with a wavelength of 633 nm illuminates two slits 0.50 mm apart and a screen is placed 2.5 m behind the slits, is 3.16 mm.
Explanation:To answer the question on the spacing between two adjacent bright fringes for a helium-neon laser with a wavelength (λ) of 633 nm illuminating two slits spaced 0.50 mm apart, with a viewing screen 2.5 m behind the slits, we use the formula for the fringe spacing in a double-slit interference pattern, Δy = (λL) / d, where Δy is the fringe spacing, λ is the wavelength of the light, L is the distance from the slits to the screen, and d is the distance between the slits.
Given λ = 633 nm = 633 × 10-9 m, L = 2.5 m, and d = 0.50 mm = 0.50 × 10-3 m, plugging these values into the formula gives:
Δy = (633 × 10-9 m × 2.5 m) / (0.50 × 10-3 m) = 3.16 × 10-3 m = 3.16 mm
Therefore, the spacing between two adjacent bright fringes is 3.16 mm.
(1.24) Consumer Reports is doing an article comparing refrigerators in their next issue. Some of the characteristics to be included in the report are the brand name and model; whether it has a top, bottom, or side-by-side freezer; the estimated energy consumption per year (kilowatts); whether or not it is Energy Star compliant; the width, depth, and height in inches; and both the freezer and refrigerator net capacity in cubic feet. The "Height" is categorical variable, quantitative variable, or individuals
Answer:
“height is a quantitative variable ”
Explanation:
According to the question asked, answer is “height is a quantitative variable ”
Height is a quantitative variable because it is related to the measurement and in measurement, when we measure something we deal with number (numerical data)
Numerical data is a type of quantitative data that is why we say “height is a quantitative variable”
There are some other possible questions in the given paragraph which I would like to mention here, are as following:
Which are the categorical variables in the given report?
Answer: Energy star complaints
Top, Bottom or side-by-side freezer
Which are the quantitative variables in the given report?
Answer: Estimated Energy Consumption in kilowatts
Width, depth, and height in inches
Capacity in Cubic Feet
What are the individuals in the report?
Answer: The brand name and model
An air-standard Otto cycle has a compression ratio of 6 and the temperature and pressure at the beginning of the compression process are 520 deg R and 14.2 lbf/in^2, respectively. The heat addition per unit mass of air is 600 Btu/lb. Determine (a) the maximum temperature, in deg R.
Answer:
The maximum temperature of the cycle is 1065⁰R
Explanation:
The maximum temperature in degree Rankin can be obtained using the formula below;
[tex]\frac{T_2}{T_1} =[\frac{V_1}{V_2}]^{1.4-1}[/tex]
Where;
T₂ is the maximum temperature of the cycle
T₁ is the initial temperature of the cycle = 520 deg R = 520 ⁰R
V₁/V₂ is the compression ratio = 6
[tex]T_2 = T_1(\frac{V_1}{V_2})^{0.4}[/tex]
[tex]T_2=T_1(6)^{0.4}[/tex]
[tex]T_2=520^0R(6)^{0.4}[/tex]
T₂ = 1064.96 ⁰R
Therefore, the maximum temperature of the cycle is 1065⁰R
An urn contains r red, w white, and b black balls. Which has higher entropy, drawing k ~2 balls from the urn with replacement or without replacement? Set it up and show why. (There is both a hard way and a relatively simple way to do this.)
Answer:
The case with replacement has higher entropy
Explanation:
The complete question is given:
'Drawing with and without replacement. An urn contains r red, w white and b black balls. Which has higher entropy, drawing k ≥ 2 balls from the urn with replacement or without replacement?'
Solution:
- n drawing is the same irrespective of whether there is replacement or not.
- X to denotes drawing from an urn with r red balls, w white balls and b black balls. So, n = b + r + w.
We have:
p_X(cr) = r / n
p_X(cw) = w / n
p_X(cb) = b / n
- Now, if Xi is the ith drawing with replacement then Xi are independent and p_Xi (x) = pX(x) for x e ( cr , cb , cw ).
- Now, let Yi be the ith drawing with replacement where Yi are not independent p_Yi (x) = pX(x) for x ∈ X.
- To see this, note Y1 = X and assume it is true for Yi and consider Yi+1:
p_Y(i+1) (cr) = p(Y(i+1),Yi).(cr, cr) + p(Y(i+1),Yi).(cr, cw) + p(Y(i+1),Yi).(cr, cb)
= pY(i+1)|Yi (cr|cr)*pYi (cr) +pY(i+1)|Yi (cr|cw)*pYi (cw) + pY(i+1)|Yi (cr|cb)*pYi (cb)
= r*( r - 1 )/n*(n-1) + w*r/n*(n-1) + b*r/n*(n-1) = r / n = p_X(cr)
- This means, using the chain rule and the conditioning theore m:
H(Y1, Y2, . . . , Yn) = H(Y1) + H(Y2|Y1) + H(Y3|Y2, Y1) + ... H(Yn|Yn−1, . . . , Y1)
=< SUM H(Yi) = n*H(X) = H(X1, X2, . . . , Xn)
- with equality if and only if the Yi were independent:
H(Y1, Y2, . . . , Yn) < H(X1, X2, . . . , Xn)
Answer: The case with replacement has higher entropy
The air contained in a room loses heat to the surroundings at a rate of 50 kJ/min while work is supplied to the room by computer, TV, and lights at a rate of 1.2 kW. What is the net amount of energy change of the air in the room during a 30-min period?
Answer:
net amount of energy change of the air in the room during a 30-min period = 660KJ
Explanation:
The detailed calculation is as shown in the attached file.
Answer:
660KJ
Explanation:
Given
Let Q = Heat Loss from room = 50kj/min
Let W = Work Supplied to room = 1.2KW
1 kilowatt = 1 kilojoules per second
So, W = 1.2KJ/s
In heat and work (Sign Convention)
We know that
1. Heat takes positive sign when it is added to the system
2. Heat takes negative sign when it is removed from the system.
3. Work done is considered positive when work is done by the system
4. Work done is considered negative when work is done on the system.
From the above illustration, heat loss (Q) = -50KJ/Min
In 30 minutes time, Q = -50Kj/Min * 30 Min
Work done in 30 minutes = -1500 KJ
Also, work supplied = -1.2Kj/s
Work supplied to the system in 30 minutes = -1.2Kj/s * 30 minutes
W = -1.2 KJ/s * 30 * 60 seconds
W = -2160KJ
In thermodynamics (First Law)
Q = W + ΔU
-1500 = -2160 + ΔU
∆U = 2160 - 1500
∆U = 660KJ
Which of the following can be used as a case label in a switch-case statement? Please select all that apply.
Assume that FIVE is a constant int and five is an int.
#define FIVE 5
int five = 5;
a. five
b.FIVE
c.5
d.five++
e. FIVE + 1
Answer:
b, c, and e
Explanation:
The values that are used for case labels must be a constant expression.
Let's examine the options;
a. five -> declared as just int
b. FIVE -> declared as constant expression
c. 5 -> It is a constant expression
d. five++ -> incremented version of option a
e. FIVE+1 -> incremented version of option b
The following laboratory tests are performed on aggregate samples:a. Specific gravity and absorptionb. Soundnessc. Sieve analysis test.What are the significance and use of each of these tests (1 point each)?
Answer:
Explanation:
A- Specific gravity and Absorption Test: Specific gravity is a measure of a material’s density as compared to the density of water at 73.4°F (23°C). Therefore, by definition, water at a temperature of 73.4°F (23°C) has a specific gravity of 1. Absorption is also determined by the same test procedure and it is a measure of the amount of water that an aggregate can absorb into its pore structure.
Specific gravity is used in a number of applications including Superpave mix design, deleterious particle identification and separation and material property change identification while
B- Soundness Test : This determines an aggregate's resistance to disintegration by weathering and in particular, freeze-thaw cycles. Aggregates that are durable (resistant to weathering) are less likely to degrade in the field and cause premature HMA pavement distress and potentially failure.It is used to identify the excess amount of lime in cement.
C - Sieve analysis Test: is a practice or procedure used to assess the particle size distribution (also called gradation) of a granular material by allowing the material to pass through a series of sieves of progressively smaller mesh size and weighing the amount of material that is stopped by each sieve as a fraction of the whole mass. This test is used to describe the properties of the aggregate and to see if it is appropriate for various civil engineering purposes such as selecting the appropriate aggregate for concrete mixes and asphalt mixes as well as sizing of water production well screens.
Water is the working fluid in an ideal Rankine cycle. The pressure and temperature at the turbine inlet are 1200 lbf /in^2 and 1100°F, respectively, and the condenser pressure is 140 lbf/in^2 The mass flow rate of steam entering the turbine is 1.4 x 10^6 lb/h. The cooling water experiences a temperature increase from 60 to 80°F, with negligible pressure drop, as it passes through the condenser. Determine for the cycle:
(a) the net power developed, in Btu/h
(b) the thermal efficiency.
(c) the mass flow rate of cooling water, in lb/h.
In creating C++ applications, you have the ability to utilize various formatting functions in the iostream library. What are some of the formatting vulnerabilities that can be encountered in using the iostream library in C++?
Answer:
i. Utility
ii. Performance
Explanation:
While there may be other vulnerabilities of the iostream library when compared to other C++ libraries, the two most common vulnerabilities are
I. Utility
II. Performance
Utility
The capacity of iostream to extend its structured read and write functions is its biggest features. One can overload the operator "<<" for various functions and types and simply use them.
This can't be done with fprintf but it can be used for classes in namespaces. Also, new streambuf types and even streams can't be created just anytime.
Performance
The effect of, “iostreams is intended to do far more than C-standard file IO.” but that is not always true because with iostreams, though there is an extensible mechanism for writing any type directly to a stream, one can't easily write new streambuf’s that will allow you to (via runtime polymorphism) be able to work with existing code.
5 kg of steam contained within a piston-cylinder assembly undergoes an expansion from state 1, where the specific internal energy is u1 = 2709.9 kJ/kg, to state 2, where u2 = 2659.6 kJ/kg.
During the process, there is heat transfer to the steam with a magnitude of 80 kJ. Also, a paddle wheel transfers energy to the steam by work in the amount of 18.5 kJ.
There is no significant change in the kinetic or potential energy of the steam.
Determine the energy transfer by work from the steam to the piston during the process, in kJ.
Answer:
Energy Transfer = 350 kJ
Explanation:
The net work can be determined from an energy balance. That is, with assumption
∆KE + ∆PE + ∆U = Q − W
Where
∆KE = ∆PE = 0 (Since There is no significant change in the kinetic or potential energy of the steam)
The net work is the sum of the work associated with the paddlewheel Wpw
and the work done on the piston Wpiston:
W = Wpw + Wpiston
From the given information, Wpw= −18.5 kJ,
Collecting results:
Wpw + Wpiston = Q − ∆U
Wpiston = Q − ∆U − Wpw= Q − m (u2− u1) − Wpw
Where Q=80kJ, m=5kg, u2 = 2659.6 kJ/kg, u1 = 2709.9 kJ/kg
= 80 kJ − 5 kg (2659.6 − 2709.9)kJ/kg − ( −18. 5 kJ)
= 350 kJ
The energy transfer by work from steam to piston is ; [tex]W_{p}[/tex] = 350 kJ
Given that ;
ΔU = ( 2659.6 - 2709.9 ) = - 50.3 kJ/Kg
Q ( heat magnitude ) = 80 kJ
m ( mass of steam ) = 5 kg
Energy transferred by paddle wheel ( [tex]W_{pp}[/tex] ) = - 18.5 kJ
Energy transferred to piston ( [tex]W_{p}[/tex] ) = ?
Total work done given that there is no change on K.E. and P.E.
Total work done = m ( ∆U ) = Q - W ----- ( 1 )
where W = [tex]W_{pp} + W_{p}[/tex]
Equation ( 1 ) becomes
ΔU = Q - [tex]( W_{PP} + W_{P} )[/tex] ------ ( 2 )
Therefore the energy transferred to piston by work from steam ( [tex]W_{p}[/tex] )
[tex]W_{p}[/tex] = Q - m( ΔU ) - [tex]W_{pp}[/tex]
= 80 - 5(- 50.3 ) - ( -18.5 )
= 350 kJ
Hence the The energy transfer by work from steam to piston is ; [tex]W_{p}[/tex] = 350 kJ
Learn more : https://brainly.com/question/2931410
A microwave transmitter has an output of 0.1 W at 2 GHz. Assume that this transmitter is used in a microwave communication system where the transmitting and receiving antennas are parabolas, each 1.2 m in diameter. a. What is the gain of each antenna in decibels
Answer:
The gain of each antenna in decibels is 353 .33 dB.
Explanation:
Given:
Frequency = 2 GHz
Diameter = 1.2 m
To Find:
The gain of each antenna in decibels = ?
Solution:
Relationship between antenna gain and effective area
[tex]= \frac{4 \pi f^2 A_e}{c^2}[/tex]-----------------------------------(1)
Where
f is frequency
[tex]A_e[/tex] is effective area
c is the speed of light
[tex]A_e[/tex] = effective area of a parabolic antenna with a face area of A is 0.56A
[tex]A_e = 0.56(\pi r^2)[/tex]
r is the radius
r = [tex]\frac{1.2}{2}[/tex]
r = 0.6
[tex]A_e = 0.56(\pi (0.6)^2)[/tex]
[tex]A_e = 0.56( 0.36 \pi)[/tex]
[tex]A_e = 0.2016 \pi[/tex]
Substituting the values in eq(1)
[tex]= \frac{4 \pi (2 \times 10^9)^2 \times 0.2016\pi}{(3 \times 10^8)^2}[/tex]
[tex]= \frac{4 \pi (4 \times 10^{18} ) \times 0.2016\pi}{(9 \times 10^{16})}[/tex]
[tex]= \frac{4 \pi (4 \times 10^{2} ) \times 0.2016\pi}{9}[/tex]
= [tex]\frac{31.80 \times 10^{2}}{9}[/tex]
= 353 .33 dB