Answer:
//This Program is written in C++
// Comments are used for explanatory purpose
#include <iostream>
using namespace std;
enum mailbox{open, close};
int box[149];
void closeAllBoxes();
void OpenClose();
void printAll();
int main()
{
closeAllBoxes();
OpenClose();
printAll();
return 0;
}
void closeAllBoxes()
{
for (int i = 0; i < 150; i++) //Iterate through from 0 to 149 which literarily means 1 to 150
{
box[i] = close; //Close all boxes
}
}
void OpenClose()
{
for(int i = 2; i < 150; i++) {
for(int j = i; j < 150; j += i) {
if (box[j] == close) //Open box if box is closed
box[j] = open;
else
box[j] = close; // Close box if box is opened
}
}
// At the end of this test, all boxes would be closed
}
void printAll()
{
for (int x = 0; x < 150; x++) //use this to test
{
if (box[x] = 1)
{
cout << "Mailbox #" << x+1 << " is closed" << endl;
// Print all close boxes
}
}
}
Explanation:
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
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
Match each situation with the type of material (conductor or inductor) you would want to use in it. You need to connect a recently landed plane to the Earth in order to ground it and remove the built-up precipitation static. You would want to use this kind of material: You need to move a live power line out of a puddle of water. There is a lot of charge moving through this line, and if any makes it to your hands it's going to hurt. You would want to use this kind of material: You need a smooth sphere to put a sensitive piece of equipment inside that will minimize any sparks between the sphere and pieces of equipment outside the sphere. You would want to use this kind of material:
Answer: for the following process, I will explain each process and where the material is best to be used.
1. You need to connect a recently landed plane to the Earth in order to ground it and remove the built-up precipitation static. You would want to use this kind of material:
Answer: Conductor
Explanation: for you to ground the plane, you need a conductor that can be able to direct the current down to the earth. Because electron can only flow freely in a conductor.
2. You need to move a live power line out of a puddle of water. There is a lot of charge moving through this line, and if any makes it to your hands it's going to hurt. You would want to use this kind of material:
Answer: Inductor
Explanation: an Inductor resist the flow of electric current through it. You have to use an inductor, to avoid been electrocuted by the live wire. If a conductor is used current will flow through it, which may lead to electrocutions, as the water is also a conductor of electricity.
3. You need a smooth sphere to put a sensitive piece of equipment inside that will minimize any sparks between the sphere and pieces of equipment outside the sphere. You would want to use this kind of material:
Answer: Inductor
Explanation: to avoid spark, an inductor should be used, because when they is a friction between a conductors and an electric current, they will be a spark. So an inductor should be used to avoid spark. Inductors does not give a spark when in friction with an electric current
AN INDUCTOR IS ANY MATERIAL THAT RESIST THE FLOW OF ELECTRIC CURRENT THROUGH IT.
A CONDUCTOR IS ANY MATERIAL THAT ALLOWS THE FLOW ELECTRIC CURRENT THROUGH IT.
There are different kinds of material that conduct electricity. The answers are below;
When one wants to connect a recently landed plane to the Earth in order to ground it and remove the built-up precipitation static. You would use a Conductor.When there is a lot of charge moving through this line, and if any makes it to your hands it's going to hurt. You would use Inductor.When one need a smooth sphere to put a sensitive piece of equipment inside that will minimize any sparks between the sphere and pieces of equipment outside the sphere. You would use an Inductor.A key difference between a conductor and an inductor is that a conductor is known to be against an adjustment of voltage but an inductor only is against an adjustment of the current.
The inductor is known to stores energy because it has an attractive field. The conductor is said to stores energy because it serves as an electric field.
Learn more about conductor or inductor from
https://brainly.com/question/15697271
A +13 nC point charge is placed at the origin, and a +8 nC charge is placed on the x axis at x=5m. At what position on the x axis is the net electric field zero? (Be careful to keep track of the direction of the electric field of each particle.)
Answer:
Explanation:
Given
Charge [tex]q_1=13\ nC is placed at x=0[/tex]
Charge [tex]q_2=8\ nC is placed at x=5\ m[/tex]
Electric field because of both the charges will be away from them
Electric field because of charge [tex]q_1[/tex] at distance r from it
[tex]E_1=\frac{kq_1}{r^2}[/tex]
[tex]E_1=\frac{9\times 10^9\times 13\times 10^{-9}}{r^2}[/tex]
Electric Field due to charge [tex]q_2[/tex] at distance of 5-r from it
[tex]E_2=\frac{kq_2}{(5-r)^2}[/tex]
[tex]E_2=\frac{9\times 10^9\times 8\times 10^{-9}}{(5-r)^2}[/tex]
at this Point Net Electric field is zero i.e.
[tex]E_1=E_2[/tex]
[tex]\frac{9\times 10^9\times 13\times 10^{-9}}{r^2}=\frac{9\times 10^9\times 8\times 10^{-9}}{(5-r)^2}[/tex]
[tex]\frac{5-r}{r}=\sqrt{\frac{8}{13}}[/tex]
[tex]5-r=0.784 r[/tex]
[tex]5=1.784 r[/tex]
[tex]r=\frac{5}{1.784}[/tex]
[tex]r=2.80\ m[/tex]
Thus at [tex]x=2.8\ m[/tex] net electric field is zero
An annular aluminum fin of rectangular profile is attached to a circular tube having an outside diameter of 25 mm and a surface temperature of 250°C. The fin is 1 mm thick and 10 mm long, and the temperature and the convection coefficient associated with the adjoining fluid are 25°C and 25W/m2 .K, respectively.
a) What is the heat loss per fin? What is the fin efficiency?
b) If 200 such fins are spaced at 5-mm increments along the tube length, what is the heat loss per meter of tube length?
c) If the tube had no fins, what would be the heat loss per meter of tube length? d) Using this result and that from part (b), what is the "fin array effectiveness"?
Answer:
See attachment below
Explanation:
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
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.
If a signal is transmitted at a power of 250 mWatts (mW) and the noise in the channel is 10 uWatts (uW), if the signal BW is 20MHz, what is the maximum capacity of the channel?
Answer:
C = 292 Mbps
Explanation:
Given:
- Signal Transmitted Power P = 250mW
- The noise in channel N = 10 uW
- The signal bandwidth W = 20 MHz
Find:
what is the maximum capacity of the channel?
Solution:
-The capacity of the channel is given by Shannon's Formula:
C = W*log_2 ( 1 + P/N)
- Plug the values in:
C = (20*10^6)*log_2 ( 1 + 250*10^-3/10)
C = (20*10^6)*log_2 (25001)
C = (20*10^6)*14.6096
C = 292 Mbps
The break mechanism used to reduce recoil in certain types of guns consists essentially of a piston attached to the barrel and moving in a fixed cylinder filled with oil. As the barrel recoils with an initial velocity vo , the piston moves and oil is forced through orifices in the piston, causing the piston and the barrel to decelerate at a rate proportional to their velocity, i.e.a=-kv. Express:a) v in terms of tb) x in terms of tc) v in terms of x
Answer:
a) v = v₀(e^-kt)
b) x = -v₀(e^-kt)/k
c) v = -kx
Explanation:
a) a = dv/dt
a = -kv = dv/dt
dv/v = -kdt
Integrating the left hand side from v₀ to v and the right hand side from 0 to t
In (v/v₀) = -kt
v/v₀ = e^(-kt)
v = v₀(e^-kt)
b) v = dx/dt
dx/dt = v = v₀(e^-kt)
dx/dt = v₀(e^-kt)
dx = v₀(e^-kt)dt
Integrating the right hand side from 0 to t and the left hand side from 0 to x,
x = -v₀(e^-kt)/k
c) Since v = v₀(e^-kt)
x = -v₀(e^-kt)/k
x = -v/k
v = -kx
Hope this helps!
The velocity (v) expressed in terms of t is; v = v₀(e^(-kt))
The distance expressed in terms of t is; x = -v₀(e^-kt)/k
The velocity expressed in terms of x is; v = -kx
What is the velocity in terms of other parameters?
a) We know that acceleration is simply change in speed with respect to time. Thus;
a = dv/dt
We are told that a = -kv. Thus;
a = dv/dt = -kv
dv/v = -kdt
Integrating both sides with respective boundary conditions gives;
v₀ to v∫dv/v = 0 to t∫-kdt
⇒ In (v/v₀) = -kt
v/v₀ = e^(-kt)
v = v₀(e^(-kt))
b) We know that velocity is change in distance with respect to time. Thus;
v = dx/dt
From a above, we saw that v = v₀(e^(-kt))
Thus;
dx/dt = v₀(e^(-kt))
dx = v₀(e^(-kt))dt
Integrating both sides with respective boundary conditions gives;
0 to x∫dx = 0 to t∫v₀(e^(-kt))dt
x = -v₀(e^-kt)/k
c) Earlier we saw that v = v₀(e^-kt)
Since x = -v₀(e^-kt)/k, then;
x = -v/k
Thus, velocity is;
v = -kx
Read more about velocity at; https://brainly.com/question/4931057
A turntable A is built into a stage for use in a theatrical production. It is observed during a rehearsal that a trunk B starts to slide on the turntable 10 s after the turntable begins to rotate. Knowing that the trunk undergoes a constant tangential acceleration of 0.28 m/s2, determine the coefficient of static friction between the trunk and the turntable.
Answer:
The coefficient of static friction, μₛ, between the trunk and turntable = 0.32
Explanation:
For this motion of the trunk B,
Initial velocity, v₀ = 0
Tangential Acceleration, a = 0.28 m/s²
Time taken, t = 10s
Using equations of motion,
v = v₀ + at
v = 0 + 0.28 × 10 = 2.8 m/s
Frictional force, Fᵣ = μₛN
μₛ = coefficient of static friction,
N = Normal reaction exerted on the trunk B as a result of its weight = mg
Doing a force balance on the trunk B,
Force keeping the trunk B in circular motion must balance the frictional forces.
Force keeping the trunk B in circular motion, F = mv²/r
Fᵣ = F
μₛN = mv²/r but N = mg
μₛmg = mv²/r
μₛg = v²/r
μₛ = v²/gr
μₛ = 2.8²/(9.8 × 2.5) = 0.32
Hope this helps!!!
The coefficient of static friction between the trunk and the turntable is 1.
Explanation:To determine the coefficient of static friction between the trunk and the turntable, we can use the equation:
fs = m * at
where fs is the static friction, m is the mass of the trunk, and at is the tangential acceleration of the trunk.
Using the given values, we have:
0.28 = m * 0.28
Solving for m, we find:
m = 1 kg
Therefore, the coefficient of static friction between the trunk and the turntable is 1.
Learn more about Coefficient of static friction here:https://brainly.com/question/33454301
#SPJ11
(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
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.
print('Predictions are hard.") print(Especially about the future.) user_num = 5 print('user_num is:' user_num)
Answer:
The correct code is given below:-
print("Predictions are hard.")
print("Especially about the future.")
user_num = 5
print("user_num is:", user_num)
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]
D *4.80 It is required to use a peak rectifier to design a dc power supply that provides an average dc output voltage of 12 V on which a maximum of ±1-V ripple is allowed. The rectifier feeds a load of 200. The rectifier is fed from the line voltage (120 V rms, 60 Hz) through a transformer. The diodes available have 0.7-V drop when conducting. If the designer opts for the half-wave circuit: (a) Specify the rms voltage that must appear across the transformer secondary. (b) Find the required value of the filter capacitor. (c) Find the maximum reverse voltage that will appear across the diode, and specify the PIV rating of the diode. (d) Calculate the average current through the diode during conduction. (e) Calculate the peak diode current.
Designing a DC power supply with a half-wave rectifier involves calculating the necessary transformer secondary RMS voltage, filter capacitor value, diode's peak inverse voltage, and average and peak diode currents considering the specific design requirements like output voltage and ripple.
Explanation:The question relates to designing a DC power supply using a half-wave rectifier, including calculations for transformer secondary voltage, filter capacitor value, peak inverse voltage (PIV), and diode current parameters. Solving such a design problem involves understanding and applying principles of electrical engineering, particularly those regarding rectification, filtering, and electrical power supply designs.
To calculate the RMS voltage required across the transformer secondary, one must consider the average output voltage required, the diode forward voltage drop, and the peak-to-peak voltage required to maintain the ripple within the specified limits.The filter capacitor value is crucial to minimize ripple and can be determined based on the allowable ripple voltage, load resistance, and the frequency of the rectified output.The PIV rating of the diode is determined by considering the maximum reverse voltage that the diode can withstand during operation, which is affected by the transformer's secondary RMS voltage and the rectifier configuration.Calculating the average and peak diode current involves understanding the load requirements and the electrical characteristics of the diode and the circuit.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)
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
Define a named tuple Player that describes an athlete on a sports team. Include the fields name, number, position, and team.
Answer:
Explanation:
we would be analyzing this question with the important code given
#code :
from collections import namedtuple
#creating a named tuple named 'Player' with field names name, number, position and team
Player = namedtuple('Player',['name','number','position', 'team'])
cam = Player('Cam Newton','1','Quarterback','Carolina Panthers')
lebron = Player('Lebron James','23','Small forward','Los Angeles Lakers')
print(cam.name+'(#'+cam.number+')'+' is a '+cam.position+' for the '+cam.team+'.')
print(lebron.name+'(#'+lebron.number+')'+' is a '+lebron.position+' for the '+lebron.team+'.')
NB:
Lebron James (#23) rep. Small forward for the LA lakers
Cam Newton(#1) rep. a Quaterback for the Carolina Panthers
cheers i hope this helps
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")
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]
A small manufacturing plant is located 2 km down a transmission line, which has a series reactance of 0.5 Ω/km. The line resistance is negligible. The line voltage at the plant is 480/08 V (rms), and the plant consumes 120 kW at 0.85 power factor lagging. Determine the voltage and power factor at the sending end of the transmission line by using.a. Complex power approachb. Circuit analysis approach.
Answer:
Complex analysis = 682.2 V
Explanation:
1. Using a complex power approach:
Data:
Power drawn by the load, Q load = 120 kW
Power factor lagging = 0.85
The reactive power is solved as follows:
tan [arccos (power factor)] = [tex]\frac{Qload}{Pload}[/tex]
tan (cos⁻¹ [0.85]) = [tex]\frac{Qload}{120}[/tex]
solving the equation above gives Qload = 74. 4 kVar
The complex power drawn in by the load is given as:
S load = P load + jQload
= 120 + j74.4 kVA
using the complex analysis above, we can solve for the current into the load like this: I = [tex]\frac{Sload}{Vload}[/tex]
= [tex]\frac{120 + j74.4}{480/8}[/tex]
= 294 (-31.8⁰) A
The power factor will be 682.2
2. Circuit power approach:
using the KVL:
Vsource = Zline + Vload
= j 1(294 (-31.8⁰) + 480
= 682.4
The power factor will be cos (21.5 - 31.79) = 0.598 lagging
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.
A simple ideal Brayton cycle with air as the working fluid has a pressure ratio of 10. The air enters the compressor at 520 R and the turbine at 2000 R. Accounting for the variation of specific heats with temperature, determine (a) the air temperature at the compressor exit, (b) the back work ratio, and (c) the thermal efficiency.
The question involves analyzing an ideal Brayton cycle to find the exit temperature from a compressor, the back work ratio, and the thermal efficiency of a gas turbine engine with air as the working fluid, accounting for the variation in specific heats with temperature.
Explanation:The student's question pertains to the ideal Brayton cycle, which is a thermodynamic cycle used to describe the workings of a gas turbine engine. Their question involves air with varying specific heats at different temperatures, typical in engineering thermodynamics analysis.
Although the appropriate formulas and calculations are not provided in the provided references, the typical approach would involve thermodynamic equations of state and specific heat relations to find the unknown temperatures, efficiency, and other parameters of interest. Analysis often includes using the Brayton cycle efficiency formula, temperature ratios, and the specific gas constant for air.
The back work ratio and thermal efficiency in particular can be calculated using the first and second laws of thermodynamics applied to each component of the cycle: the compressor and turbine. As specific heats vary with temperature, one typically uses mean values or functions that provide the specific heat values at the given temperatures.
Explanation of the Brayton cycle in gas turbines, calculation methods for compressor exit temperature, back work ratio, and thermal efficiency.
The Brayton cycle is a thermodynamic cycle that describes how gas turbines operate. It consists of four processes: two isentropic (reversible adiabatic) processes and two isobaric (constant-pressure) processes.
(a) The air temperature at the compressor exit can be calculated using the temperature ratios at the compressor and turbine, and the pressure ratio.
(b) The back work ratio is the ratio of the work required to drive the compressor to the work produced by the turbine.
(c) The thermal efficiency of the Brayton cycle can be determined by comparing the work output to the heat input.
Two large, nonconducting plates are suspended 8.25 cm apart. Plate 1 has an area charge density of + 86.8 μC/m2 , and plate 2 has an area charge density of + 23.6 μC/m2 . Treat each plate as an infinite sheet. Two parallel vertical lines are horizontally separated from each other. Each line represents a nonconducting plate. The plate on the left is labeled plate 1, and the plate on the right is labeled plate 2. The region of space to the left of plate 1 is labeled region A. The region of space between the two plates is labeled region B. The region to the right of plate 2 is labeled region C. How much electrostatic energy U E is stored in 2.29 cm3 of the space in region A?
The electrostatic energy in region A can be found by first calculating the electric field due to Plate 1, using the given charge density, and then determining the energy density. This energy density is then multiplied by the volume in region A, converted to SI units, to find the total electrostatic energy stored.
Explanation:To find the electrostatic energy UE stored in a certain volume of region A, we must first determine the electric field in that region. For two infinite charged plates as described, we can use the principle of superposition. Each plate generates an electric field which is independent of the other. Plate 1, with a positive charge density, will generate an electric field directed away from itself, while Plate 2 will also generate an electric field directed away since it also has a positive charge density.
However, the student's scenario only involves calculating the energy in region A, where only the electric field due to Plate 1 exists since Plate 2's field does not extend into that region. The electric field E due to an infinite plate with charge density σ is E = σ / (2ε0) where ε0 is the permittivity of free space (ε0 ≈ 8.85 x 10-12 C2/N·m2). In this case, E for Plate 1 is calculated using σ = +86.8 μC/m2.
The electrostatic energy density u in a region with an electric field E is given by u = ε0E2/2. The energy density can then be multiplied by the volume to find the total energy UE. The volume in region A is 2.29 cm3. Hence, UE = u × Volume.
It's important to convert all measurements into SI units before performing the calculations. The area charge density has to be converted from μC/m2 to C/m2, and the volume from cm3 to m3.
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
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.
A double-pane insulated window consists of two 1 cm thick pieces of glass separated by a 1.8 cm layer of air. The window measures 4 m in width and 3 m in height. The inside air is at 27ºC with a convection coefficient of 12 W/m2K, and the outer surface of the glass is at -10ºC. (a) Sketch the thermal circuit. (b) Find the temperature of the glass surface inside the room. (c) Calculate the heat loss through the window. (d) Which, if any, thermal resistances are negligible (less than 1% of the total)?
Answer:
(b). T = 22.55 ⁰C
(c). q = 557.8 W
Explanation:
we take follow a step by step process to solving this problem.
from the question, we have that
The two glass pieces is separated by a 1.8 cm distance layer of air.
the thickness of glass piece is 1 cm
width = 4 m
the height = 3 m
(a). the sketch of the thermal circuit is uploaded in the picture below.
(b). the thermal resistance due to the conduction in the first glass plane is given thus;
R₁ = Lg / Kg A ................(1)
given that Kg rep. the thermal conductivity of the glass plane
A = conduction surface area
Lg = Thickness of glass plane4
taking the thermal conductivity of glass plane as Kg = 0.78 w/mk
inputting values into equation (1) we have,
R₁ = [1 (cm) ˣ 1 (m)/100 (cm)] / [(0.78 w/mk)(4m ˣ 3m)]
R₁ = 1.068 ˣ 10 ⁻³ k/w
Being that we have same thermal resistance in the first and second plane,
therefore R₁ = R₃ = 1.068 ˣ 10 ⁻³ k/w
⇒ Also the thermal resistance between air and glass as a result of the conduction by the layer is given thus
R₂ = La/KaA .....................(2)
given Ka = thermal conductivity of air
A = surface area
La = thickness of air
substituting values into the equation we have
R₂ = [1.8 (cm) ˣ 1 (m)/100 (cm)] / [(0.0262 w/mk)(4m ˣ 3m)]
R₂ = 5.73 ˣ 10⁻² k/w
Given the thermal resistance on the outer surface due to convection, we have
R₄ = 1/hA
inputting value gives R₄ = 1 / (12 w/m² ˣ 12m) = 6.94 ˣ 10⁻³k/w
R₄ = 6.94 ˣ 10⁻³k/w
Finally the sum total of thermal resistance = R₁ + R₂ + R₃ + R₄
R-total = 0.0663 kw
From this we can calculate the rate of heat loss
using q = Ti - To / R-total ..............(3)
given Ti and To is the inside and outside temperature i.e. 27⁰C and -10⁰C
from equation (3),
q = 27- (-10) / 0.0063 = 557.8 W
q = 557.8 W
⇒ Applying the heat transfer formula for inside surface glass temperature gives;
q = Ti - T₂ / R₃ + R₄
T₂ = Ti - q (R₃ + R₄)
T₂ = 27 - 557.8 (1.068ˣ10⁻³ + 6.94ˣ10⁻³ ) = 22.55°C
T₂ = 22.55°C
cheers i hope this helps
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]
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
On a given day, a barometer at the base of the Washington Monument reads 29.97 in. of mercury. What would the barometer reading be when you carry it up to the observation deck 500 ft above the base of the monument?
Answer:
The barometer reading will be 29.43 in
Explanation:
Using the formula of pressure variation
p2 - p1 = -yair * H
= 7.65 * [tex]10^{-2} \frac{lb}{ft^{3} } * 500 ft\\[/tex]
= 38.5 [tex]\frac{lb}{ft^{2} }[/tex]
According to the relationship between the pressure and the height of the mercury column
p = yHg * h --> where yHg and h is the barometer reading
yHg [tex](\frac{29.97}{12} ft)[/tex] - yHg * h1 = 38.5 [tex]\frac{lb}{ft^{2} }[/tex]
h1 = ([tex]\frac{29.97}{12} ft[/tex]) - [tex]\frac{38.5 \frac{lb}{ft^{2} } }{847 \frac{lb}{ft^{3} } }[/tex]
[tex][(\frac{29.97}{12} ft) - 0.0455 ft] - 12 \frac{in}{ft} \\\\h1 = 29.43 in[/tex]
The barometer reading be "29.43 in".
According to the question,
Barometer reading,
[tex]H' = 29.97 \ in[/tex]Pressure variation for incompressible and static fluid will be:
→ [tex]P_2-P_1 = V_{air} H[/tex]
[tex]= 7.65\times 10^{-2}\times 500[/tex]
[tex]= 38.5 \ lb/ft^2[/tex]
Pressure and height relationship for mercury will be:
→ [tex]P = V_{Hg} H'[/tex]
→ [tex]V.Hg\times \frac{29.97}{12} - V_{Hg} h_1 = 38.5[/tex]
→ [tex]h_1 = \frac{29.97}{12} - \frac{38.5}{847}[/tex]
[tex]= [\frac{29.97}{12} - 0.0455][/tex]
[tex]= 29.42 \ in[/tex]
Thus the above answer is right.
Learn more:
https://brainly.com/question/9572754