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
What will happen if you drop a golf ball, a baseball, and a bowling ball at the same instant from the top of a tall building
V125BC [204]
Depending on the height of the building they can break due to impact on the floor.
8 0
2 years ago
An 80-kg hiker climbs to the top of a tall hill and builds up 470,000 J of gravitational potential energy. How high did the hike
nekit [7.7K]

Answer:

599 meters is the answer rounded to the nearest whole number and 599.489795918 meters is the complete answer

Explanation:

to find gravitational potential energy you multiply mass x acceleration due to gravity (always 9.8 on earth) x hight

since we know the gravitational potential energy and want to find out the hight, we take the gravitational potential energy (470,000) and divide it by the product of acceleration due to gravity x mass (9.8 x 80)

so how high the hiker climbed is equal to 470,000 divided by (9.8 x 80)

hight = 470,000 / (9.8 x 80)

hight = 470,000 / 784

hight = 599.489795918 meters

as for rounding, if the decimal is less than 5 you round "down" and keep the current whole number, if the decimal is 5 or greater you round "up" and add 1 to get your new number

5 0
3 years ago
Read 2 more answers
We have an object with a density of 620g/cm^3 and a volume of 75cm cm^3. What is the mass of this object
Gennadij [26K]

density tomes volume

620x75 ... 3100x15

3 0
3 years ago
A 4.10 g bullet moving at 837 m/s strikes a 820 g wooden block at rest on a frictionless surface. The bullet emerges, traveling
atroni [7]

Answer:

(a) 1.85 m/s

(b) 4.1 m/s

Explanation:

Data

  • bullet mass, Mb = 4.10 g
  • initial bullet velocity, Vbi = 837 m/s
  • wooden block mass, Mw = 820 g
  • initial wooden block  velocity, Vwi = 0 m/s
  • final bullet velocity, Vbf = 467 m/s

(a) From the conservation of momentum:

Mb*Vbi + Mw*Vwi = Mb*Vbf + Mw*Vwf

Mb*(Vbi - Vbf)/Mw = Vwf

4.1*(837 - 467)/820 = Vwf

Vwf = 1.85 m/s

(b) The speed of the center of mass speed is calculated as follows:

V = Mb/(Mb + Mw) * Vbi

V = 4.1/(4.1 + 820) * 837

V = 4.1 m/s

6 0
3 years ago
PLEASE HELP URGETNT
Angelina_Jolie [31]

Answer:

I think (d) is right answer

6 0
2 years ago
Other questions:
  • When conducting this experiment, some procedures call for heating the substance several
    5·1 answer
  • - How long does it take a packet of length 1,000 bytes to propagate over a link of distance 2,500 km, propagation speed 2.5 *10^
    13·1 answer
  • Which of the following is least likely to result from seafloor spreading​
    6·1 answer
  • Mr. Hershman has purchased a farm that is in the shape of a rectangle. The dimensions of the piece of land are 4.3 km by 4.85 km
    14·1 answer
  • A beam of protons is moving toward a target in a particle accelerator. This beam constitutes a current whose value is. (a) How m
    12·1 answer
  • If a water wave completes one cycle in 2 seconds, what is the period of the wave?
    5·1 answer
  • Answer the question correctly. Look at the 2 pictures.
    7·2 answers
  • Please help me out i'm so depressed and such a failure
    12·1 answer
  • Two balls are thrown against a wall with the same velocity. The first ball is made of rubber and bounces straight back with some
    13·1 answer
  • What is the science principle that explains magnetic fields? I need this fast, please!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!