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]
3 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]3 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
De donde eres responde y te doy corona
irakobra [83]

soy de texas, united states

8 0
2 years ago
Only 5 questions plz answer.
Masja [62]
Question 18: a
question 19: b
question 20: c
6 0
2 years ago
Read 2 more answers
You stand on top a building 44 m tall with a water balloon. You drop the water balloon from rest. How fast is the balloon moving
Alecsey [184]
<h2>The balloon is moving when it is halfway down the building at 20.78 m/s.</h2>

Explanation:

We have equation of motion v² = u² + 2as

Initial velocity, u = 0 m/s  

Acceleration, a = 9.81 m/s²  

Displacement, s = 0.5 x 44 = 22 m

Substituting  

v² = u² + 2as

v² = 0² + 2 x 9.81 x 22

v² = 431.64

v = 20.78 m/s

Velocity at 22 m = 20.78 m/s

The balloon is moving when it is halfway down the building at 20.78 m/s.

7 0
3 years ago
If the caffeine concentration in a particular brand of soda is 2.97 mg/oz, 2.97 mg/oz, drinking how many cans of soda would be l
Ray Of Light [21]

Explanation:

The given data is as follows.

     Concentration of caffeine = 2.97 mg/oz

     Number of oz in a can = 12 oz

Therefore, the concentration of caffeine in one can is calculated as follows.

                 = (12 \times 2.97) mg

                 = 35.64 mg

                 = 35.64 \times 10^{-3} g

Since, it is given that lethal dose is 10.0 g. Hence, number of cans are calculated as follows.

     No. of cans = \frac{\text{Lethal dose}}{\text{concentration in one can}}

                         = \frac{10 g}{35.64 \times 10^{-3} g}

                         = 280.58

                         = 281 (approx)

Thus, we can conclude that 281 cans of soda would be lethal.

5 0
3 years ago
The ____ is the place where position equals zero
Alexus [3.1K]
The answer to your question is the Origin 
7 0
3 years ago
Other questions:
  • What do microwaves have in common with light waves?
    10·2 answers
  • Please help me with part b.
    11·1 answer
  • Which of the following are true for acceleration?
    12·2 answers
  • An airplane travels at 300 mi/h south for 2.00 h and then at 250 mi/h north for 750 miles. what is the average speed for the tri
    12·1 answer
  • Jeff puts on a leather jacket over his sweater. The sweater becomes negatively charged. Which statements about Jeff’s situation
    9·2 answers
  • The carbon isotope 14C is used for carbon dating of archeological artifacts. 14C(mass 2.34×10−26kg) decays by the process known
    12·1 answer
  • 5 points
    13·1 answer
  • Which component measures the potential difference across a branch in a circuit? A. switch B. resistor C. ammeter D. voltmeter
    9·1 answer
  • It took 500 newtons of force to push a car 4 meters. How much work was done?
    7·1 answer
  • when a metal sphere is dropped in to a tall cylinder containing liquid its acceleration is g÷2 (gravity over 2) show that : dens
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!