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
jenyasd209 [6]
4 years ago
9

Write code to compare two numbers. The code should check whether the first number is less than or equal to the second and then d

isplay the result on the serial monitor.
Physics
1 answer:
belka [17]4 years ago
7 0

Answer:

Explanation:

I will be using Python 3 syntax in writing the code.

- First we need to define a Function 'compare_number' that parse in 2 variables x and y to be compared.

- Then we use the conditional statement if/else to check for the conditions.

- Finally, we will return a Boolean operator True/False or rather print out the statement result to the console. The code is as shown below.

def compare_numbers (x, y):

if x <= y:

return True

else:

return False

compare_number (2,3)

Since 2 is less than 3, the result that will be displayed on the console will be True.

You might be interested in
What will be the acceleration of a 40-kilogram object that is pushed with a net force of 80 newtons?
ratelena [41]
= 80 N/40 kg
= 2 m/s 2
4 0
3 years ago
An open-end mercury manometer is connected to a low-pressure pipeline that supplies a gas to a laboratory. Because paint was spi
Svetllana [295]

Answer:

a

P_G  = 14.03 \  psig  

b

h_m =   0.148 \  m

Explanation:

From the question we are told that

The pressure of the manometer when there is no gas flow is P_{m} =  15.5 \  psig  =  15.5 *  6894.76 =  106868.78 \ N/m^2

The level of mercury is h  =  950 \ mm  =  0.950 \  m

The drop in the mercury level at the visible arm is d =  39.0 =  0.039 \  m

Generally when there is no gas flow the pressure of the manometer is equal to the gauge pressure which is mathematically represented as

P_g  =  P_m  =  g *  \delta h  * \rho

Here \rho is the density of mercury with value \rho = 13.6 *10^{3} kg/m^3

and \delta h is the difference in the level of gas in arm one and two

So

\delta h  =  \frac{106868.78}{  13.6 *10^{3} *  9.8 }

\delta h  = 0.802 \  m

Generally the height of the mercury at the arm connected to the pipe is mathematically represented as

h_m =   0.950 -  0.802

=> h_m =   0.148 \  m

Generally from manometry principle we have that

P_G + \rho * g  * d   -  \rho *  g  * [h - (h_m + d)] = 0

Here P_G is the pressure of the gas

P_G +13.6 *10^{3} * 9.8  * 0.039    -  13.6 *10^{3}  *  9.8  * [0.950 - (0.148 + 0.039)] = 0

P_G  =  9.6724 04 *10^{4} \  N/m^2

converting to  psig

P_G  = \frac{ 9.6724 04 *10^{4} }{6894.76}

P_G  = 14.03 \  psig

6 0
3 years ago
One star might appear brighter than another star because
Marrrta [24]

Answer:

A star's brightness also depends on its proximity to us. The more distant an object is, the dimmer it appears. Therefore, if two stars have the same level of brightness, but one is farther away, the closer star will appear brighter than the more distant star - even though they are equally bright!

Can I have brainliest?

4 0
3 years ago
When a ball is tossed upward, along the way
mestny [16]

Answer:

A

Explanation:

going upward, kinetic energy decrease and potential energy increase

5 0
4 years ago
Read 2 more answers
3. How do you think a hot air balloon works?
tiny-mole [99]

Answer:hot air

Explanation:Hot air goes up, so when you put it in a hot air balloon fire is placed at the oppening to creat hot air and lift the balloon! :)

5 0
3 years ago
Other questions:
  • A string is stretched by two equal but opposite forces f newton each what is tension in string
    7·1 answer
  • If the distance between two masses is tripled, the gravitational force between changes by a factor of
    11·1 answer
  • A planar loop consisting of four turns of wire, each of which encloses 200 cm2, is oriented perpendicularly to a magnetic field
    5·1 answer
  • A "swing" ride at a carnival consists of chairs that are swung in a circle by 19.6 m cables attached to a vertical rotating pole
    8·2 answers
  • The electric potential is 40 V at point A near a uniformly charged sphere. At point B, 2.0 μm farther away from the sphere, the
    12·1 answer
  • Rays of light incident on a lens and parallel to the principal axis of the lens converge
    12·2 answers
  • I don’t understand this question
    8·1 answer
  • You can identify a pure substance if you know it's ?
    8·2 answers
  • Please help and show working please
    6·1 answer
  • How do you find the amount of force given to an object
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!