Full Question
1. Correct the following code and
2. Convert the do while loop the following code to a while loop
declare integer product
declare integer number
product = 0
do while product < 100
display ""Type your number""
input number
product = number * 10
loop
display product
End While
Answer:
1. Code Correction
The errors in the code segment are:
a. The use of do while on line 4
You either use do or while product < 100
b. The use of double "" as open and end quotes for the string literal on line 5
c. The use of "loop" statement on line 7
The correction of the code segment is as follows:
declare integer product
declare integer number
product = 0
while product < 100
display "Type your number"
input number
product = number * 10
display product
End While
2. The same code segment using a do-while statement
declare integer product
declare integer number
product = 0
Do
display "Type your number"
input number
product = number * 10
display product
while product < 100
Answer:
4m/s
Explanation:
We know that power supplied by the motor should be equal to the rate at which energy is increased of the mass that is to be hoisted
Mathematically
\
We also know that Power = force x velocity ..................(i)
The force supplied by the motor should be equal to the weight (mg) of the block since we lift the against a force equal to weight of load
=> power = mg x Velocity........(ii)
While hoisting the load at at constant speed only the potential energy of the mass increases
Thus Potential energy = Mass x g x H...................(iii)
where
g = accleration due to gravity (9.81m/s2)
H = Height to which the load is hoisted
Equating equations (ii) and (iii) we get
m x g x v = 
thus we get v = H/t
Applying values we get
v = 6/1.5 = 4m/s
Answer:
The performance of the polymer is basically change by the various type of factors like shape, tensile strength and color.
The polymer based products are basically influenced by the environmental factors like light, acids or alkalis chemicals, salts and also heat.
The additives is one of the type of chemical polymer which basically include polymer matrix for improving the ability of processing of the polymer. It also helps to enhance the production and requirement of the polymer products in the environment.
Answer:
theoretical fracture strength = 16919.98 MPa
Explanation:
given data
Length (L) = 0.28 mm = 0.28 × 10⁻³ m
radius of curvature (r) = 0.002 mm = 0.002 × 10⁻³ m
Stress (s₀) = 1430 MPa = 1430 × 10⁶ Pa
solution
we get here theoretical fracture strength s that is express as
theoretical fracture strength =
.............................1
put here value and we get
theoretical fracture strength =
theoretical fracture strength =
theoretical fracture strength = 16919.98 MPa
Answer:
q = 1.73 W
Explanation:
given data
small end = 5 cm
large end = 10 cm
high = 15 cm
small end is held = 600 K
large end at = 300 K
thermal conductivity of asbestos = 0.173 W/mK
solution
first we will get here side of cross section that is express as
...............1
here x is distance from small end and S1 is side of square at small end
and S2 is side of square of large end and L is length
put here value and we get
S = 5 +
S =
m
and
now we get here Area of section at distance x is
area A = S² ...............2
area A =
m²
and
now we take here small length dx and temperature difference is dt
so as per fourier law
heat conduction is express as
heat conduction q =
...............3
put here value and we get
heat conduction q =
it will be express as
now we intergrate it with limit 0 to 0.15 and take temp 600 to 300 K
solve it and we get
q (30) = (0.173) × (600 - 300)
q = 1.73 W