1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
k0ka [10]
3 years ago
8

declare integer product declare integer number product = 0 do while product < 100 display ""Type your number"" input number p

roduct = number * 10 loop display product End While
Engineering
1 answer:
Brilliant_brown [7]3 years ago
4 0

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

You might be interested in
As shown, a load of mass 10 kg is situated on a piston of diameter D1 = 140 mm. The piston rides on a reservoir of oil of depth
telo118 [61]

Answer:

165 mm

Explanation:

The mass on the piston will apply a pressure on the oil. This is:

p = f / A

The force is the weight of the mass

f = m * a

Where a in the acceleration of gravity

A is the area of the piston

A = π/4 * D1^2

Then:

p = m * a / (π/4 * D1^2)

The height the oil will raise is the heignt of a colum that would create that same pressure at its base:

p = f / A

The weight of the column is:

f = m * a

The mass of the column is its volume multiplied by its specific gravity

m  = V * S

The volume is the base are by the height

V = A * h

Then:

p = A * h * S * a / A

We cancel the areas:

p = h * S * a

Now we equate the pressures form the piston and the pil column:

m * a / (π/4 * D1^2) = h * S * a

We simplify the acceleration of gravity

m / (π/4 * D1^2) = h * S

Rearranging:

h = m / (π/4 * D1^2 * S)

Now, h is the heigth above the interface between the piston and the oil, this is at h1 = 42 mm. The total height is

h2 = h + h1

h2 = h1 + m / (π/4 * D1^2 * S)

h2 = 0.042 + 10 / (π/4 * 0.14^2 * 0.8) = 0.165 m = 165 mm

7 0
2 years ago
python Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month an
kupik [55]

Answer:

month = input("Input the month (e.g. January, February etc.): ")

day = int(input("Input the day: "))

if month in ('January', 'February', 'March'):

season = 'winter'

elif month in ('April', 'May', 'June'):

season = 'spring'

elif month in ('July', 'August', 'September'):

season = 'summer'

else:

season = 'autumn'

if (month == 'March') and (day > 19):

season = 'spring'

elif (month == 'June') and (day > 20):

season = 'summer'

elif (month == 'September') and (day > 21):

season = 'autumn'

elif (month == 'December') and (day > 20):

season = 'winter'

print("Season is",season)

Explanation:

4 0
3 years ago
A rotor in a compressor stage has a mean blade radius of 0.285 m and an angular rotor velocity of 8500 RPMs. The static temperat
pantera1 [17]

Answer:

0,285 is the answer

Explanation:

6 0
3 years ago
From the following numbered list of characteristics, decide which pertain to (a) precipitation hardening, and which are displaye
Blababa [14]

Answer:

(a) Precipitation hardening

(1) The strengthening mechanism involves the hindering of dislocation motion by precipitates/particles.

(2) The hardening/strengthening effect is not retained at elevated temperatures for this process.

(4) The strength is developed by a heat treatment.  

(b) Dispersion strengthening

(1) The strengthening mechanism involves the hindering of dislocation motion by precipitates/particles.  

(3) The hardening/strengthening effect is retained at elevated temperatures for this process.

(5) The strength is developed without a heat treatment.  

7 0
3 years ago
It is true about Metals and alloys: a)-They are good electrical and thermal conductors b)-They can be used as semi-conductors c)
ycow [4]

Answer:

(d) a and c are correct

Explanation:

METALS : Metal are those materials which has very high ductility, high modulus of elasticity, good thermal and electrical conductivity

for example : iron, gold ,silver, copper

ALLOYS: Alloys are those materials which are made up of combining of two or more than two metals these also have good thermal and electrical conductivity and me liable property

for example ; bronze and brass

so from above discussion it is clear that option (d) will be the correct option

8 0
3 years ago
Read 2 more answers
Other questions:
  • You find a publication from a research laboratory that identifies a new catalyst for ammonia synthesis. The article contains the
    6·1 answer
  • Which one of the following statements about the Wright brothers is not true?
    6·1 answer
  • Is air conditioner a refrigerator?
    10·1 answer
  • Consider laminar, fully developed flow in a channel of constant surface temperature Ts. For a given mass flow rate and channel l
    15·1 answer
  • Draw a flowchart to represent the logic of a program that allows the user to enter values for the current year and the user’s bi
    14·1 answer
  • The beam is supported by a pin at A and a roller at B which has negligible weight and a radius of 15 mm. If the coefficient of s
    7·1 answer
  • How long does it take to get a master's degree in Mechanical engineering?
    12·1 answer
  • What do machines require in order to work?
    12·1 answer
  • Implement a program that manages shapes. Implement a class named Shape with a method area() which returns the double value 0.0.
    8·1 answer
  • GMA MIG weiding is a
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!