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
dybincka [34]
3 years ago
9

What is something that a robot or computer program might do that requires a decision, or conditional statement?

Engineering
1 answer:
Veseljchak [2.6K]3 years ago
8 0

Answer:

Make decisions such as greeting a user depending on the time of day. Example: saying good morning while it is morning but saying good afternoon to the user only when it is the appropriate time.

Explanation:

I have used decision making methods in various programs to greet users, and determine whether to do one thing or another based on values passed to the program

If you have any questions feel free to ask me and I will do my best to help and explain! :)

You might be interested in
A 4140 steel shaft, heat-treated to a minimum yield strength of 100 ksi, has a diameter of 1 7/16 in. The shaft rotates at 600 r
velikii [3]
Answer:










Explanation:



4140-40 I’d pick wood




I hope this helps! :)
4 0
3 years ago
Read 2 more answers
Reference Parameters (returning multiple values): Write a C++ function that converts standard time to military time. Inputs incl
valkas [14]

Answer:

Code is given as below:

Explanation:

#include <iostream>

using namespace std;

//function prototype declaration

void MilitaryTime(int, int, char, int &, int &);

int main()

{

    //declare required variables

    int SHour, SMin, MHour, MMin;

    char AorP;

    //promt and read the hours from the user

    cout<<"Enter hours in standard time : ";

    cin>>SHour;

    //check the hours are valid are not

    while(SHour<0 || SHour>12)

    {

         cout<<"Invalid hours for standard time. "

             <<"Try again..."<<endl;

         cout<<"Enter hours in standard time : ";

         cin>>SHour;

    }

    //promt and read the minutes from the user

    cout<<"Enter minutes in standard time : ";

    cin>>SMin;

    //check the minutes are valid are not

    while(SMin<0 || SMin>59)

    {

         cout<<"Invalid minutes for standard time. "

             <<"Try again..."<<endl;

         cout<<"Enter minutes in standard time : ";

         cin>>SMin;

    }

    //promt and read the am or pm from the user

    cout<<"Enter standard time meridiem (a for AM p for PM): ";

    cin>>AorP;

    //check the meridiem is valid are not

    while(!(AorP=='a' || AorP=='p' || AorP=='A' || AorP=='P'))

    {

         cout<<"Invalid meridiem for standard time. "

             <<"Try again..."<<endl;

         cout<<"Enter standard time meridiem (a for AM p for PM): ";

         cin>>AorP;

    }

    //call function to calculate the military time

    MilitaryTime(SHour, SMin, AorP, MHour, MMin);

    //fill zeros and display standard time

    cout.width(2);

    cout.fill('0');

    cout<<SHour<<":";

    cout.width(2);

    cout.fill('0');

    cout<<SMin;

    if(AorP=='a' || AorP=='A')

         cout<<" am = ";

    else

         cout<<" pm = ";

    //fill zeros and display military time

    cout.width(2);

    cout.fill('0');

    cout<<MHour;

    cout.width(2);

    cout.fill('0');

    cout<<MMin<<endl;

    system("PAUSE");

    return 0;

}

//function to calculate the military time with reference parameters

void MilitaryTime(int SHour, int SMin, char AorP, int &MHour, int &MMin)

{

    //check the meredium is am or pm

    //and calculate hours

    if(AorP=='a' || AorP=='A')

    {

         if(SHour==12)

             MHour = 0;

         else

             MHour = SHour;

    }

    else

         MHour = SHour+12;

    MMin = SMin;

5 0
3 years ago
Air in a large tank at 300C and 400kPa, flows through a converging diverging nozzle with throat diameter 2cm. It exits smoothly
-Dominant- [34]

Answer:

The answer is "3.74 \ cm\ \ and \ \ 0.186 \frac{kg}{s}"

Explanation:

Given data:  

Initial temperature of tank T_1 = 300^{\circ}\ C= 573 K

Initial pressure of tank P_1= 400 \ kPa

Diameter of throat d* = 2 \ cm

Mach number at exit M = 2.8

In point a:

calculating the throat area:

A*=\frac{\pi}{4} \times d^2

      =\frac{\pi}{4} \times 2^2\\\\=\frac{\pi}{4} \times 4\\\\=3.14 \ cm^2

Since, the Mach number at throat is approximately half the Mach number at exit.  

Calculate the Mach number at throat.  

M*=\frac{M}{2}\\\\=\frac{2.8}{2}\\\\=1.4

Calculate the exit area using isentropic flow equation.

\frac{A}{A*}= (\frac{\gamma -1}{2})^{\frac{\gamma +1}{2(\gamma -1)}}  (\frac{1+\frac{\gamma -1}{2} M*^2}{M*})^{\frac{\gamma +1}{2(\gamma -1)}}

Here: \gamma is the specific heat ratio. Substitute the values in above equation.

\frac{A}{3.14}= (\frac{1.4-1}{2})^{-\frac{1.4+1}{2(1.4 -1)}}  (\frac{1+\frac{1.4-1}{2} (1.4)^2}{1.4})^{\frac{1.4+1}{2(1.4-1)}} \\\\A=\frac{\pi}{4}d^2 \\\\10.99=\frac{\pi}{4}d^2 \\\\d = 3.74 \ cm

exit diameter is 3.74 cm

In point b:

Calculate the temperature at throat.

\frac{T*}{T}=(1+\frac{\Gamma-1}{2} M*^2)^{-1}\\\\\frac{T*}{573}=(1+\frac{1.4-1}{2} (1.4)^2)^{-1}\\\\T*=411.41 \ K

Calculate the velocity at exit.  

V*=M*\sqrt{ \gamma R T*}

Here: R is the gas constant.  

V*=1.4 \times \sqrt{1.4 \times 287 \times 411.41}\\\\=569.21 \ \frac{m}{s}

Calculate the density of air at inlet

\rho_1 =\frac{P_1}{RT_1}\\\\=\frac{400}{ 0.287 \times 573}\\\\=2.43\  \frac{kg}{m^3}

Calculate the density of air at throat using isentropic flow equation.  

\frac{\rho}{\rho_1}=(1+\frac{\Gamma -1}{2} M*^2)^{-\frac{1}{\Gamma -1}} \\\\\frac{\rho *}{2.43}=(1+\frac{1.4-1}{2} (1.4)*^2)^{-\frac{1}{1.4-1}} \\\\\rho*= 1.045 \ \frac{kg}{m^3}

Calculate the mass flow rate.  

m= \rho* \times A* \times V*\\\\= 1.045 \times 3.14 times 10^{-4} \times 569.21\\\\= 0.186 \frac{kg}{s}

5 0
2 years ago
A sandy soil has a total unit weight of 120 pcf, a specific gravity of solids of 2.64, and a water content of 16 percent. Comput
olchik [2.2K]

Answer:

A). Dry unit weight = 1657.08Kg/m3

B). Porosity  = 0.37

C). Void ratio  = 0.593 

D). 0.712

Explanation:

Total unit weight, Y = 120pcf =1922.2 Kg/m3

Specific gravity of solids, Gs = 2.64

Water content, w = 16%

A). Dry unit weight

Yd = Y/(1+w)

= 1922.2/(1+0.16) = 1657.08Kg/m3

B). Porosity

However void ratio, e = Gs×Yw/Yd, where Yw = 1000Kg/m3

Void ratio = 2.64×1000/1657.08 = 0.593

 

And porosity = e/(1+e) =0.593/(1+0.593) = 0.37

C). void ratio, e = 0.593

D). Degree of saturation, S = m×Gs/e where m =water content

S = 0.16×2.64/0.593 = 0.712

5 0
3 years ago
If you've wondered about the flushing of toilets on the upper floors of city skyscrapers, how do you suppose the plumbing is des
Marina86 [1]

Answer:

<em>The plumbing is designed to reduce the impact of pressure forces due to the height of skyscrapers. This is achieves by narrowing down the pipe down to the basement, using pipes with thicker walls down the basement, and allowing vents; to prevent clogging of the pipes.</em>

<em></em>

Explanation:

<em>Pressure increases with depth and density</em>. In skyscrapers, a huge problem arises due to the very tall height of most skyscrapers. Also, sewage slug coming down has an increased density when compared to that of water, and these two factors can't be manipulated. The only option is to manipulate the pipe design. <em>Pipes in skyscrapers are narrowed down with height, to reduce accumulation at the bottom basement before going to the sewage tank. Standard vents are provided along the pipes, to prevent clogging of the pipes, and pipes with thicker walls are used as you go down the basement of the skyscraper, to withstand the pressure of the sewage coming down the pipes.</em>

3 0
3 years ago
Other questions:
  • A circuit-switching scenario in whichNcs users, each requiring a bandwidth of 25 Mbps, must share a link of capacity 150 Mbps.
    12·1 answer
  • The device whose operation closely matches the way the clamp-on ammeter works is
    8·1 answer
  • A mercury thermometer has a cylindrical capillary tube with an internal diameter of 0.2 mm. If the volume of the thermometer and
    10·1 answer
  • What type of oil pressure gauge should be used when
    14·1 answer
  • Different types of steels contain different elements that alter the characteristics of the steel. For each of the following elem
    6·1 answer
  • Before accurate distance standards, a cubit was the length of whose forearm?
    5·1 answer
  • Describe the algorithm you use for looking up a person’s telephone number in the phone book. The input is person’s name; the out
    9·2 answers
  • Select the correct answer. Felix aspires to be an engineer working for the government. What credentials will Felix require to ap
    5·1 answer
  • Are there any companies that you can get a job at as an air craft engeer after university​
    14·1 answer
  • Dear sir i want to ask something about the solution of my question?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!