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
I don't understand this question at all, can I please get some help?
beks73 [17]
V^2/R=180W
v=root 180R
4 0
3 years ago
Which one of the following statements concerning the momentum of a system when the net force acting on the system is equal to ze
Alex

Answer:

D

Explanation:

According to newton's 2nd law rate of change of momentum is directly proportional to the force applied on the body. Since, net Force is zero this means momentum did not change or momentum of the body remained constant.

Hence, the system have constant value of momentum. Therefore, option D is correct.

5 0
3 years ago
what distance is a book from the floor if the book contains 196 joules f potential energy and has a mass of 5 kg?
AleksAgata [21]
E=mgh.   196=5kg*9.81m/s^2*h.  So h=196/(5*9.81)=4m
5 0
3 years ago
Light in the air is incident at an angle to the surface of (12.0 A) degrees on a piece of glass with an index of refraction of (
Orlov [11]

The question is incomplete. You dis not provide values for A and B. Here is the complete question

Light in the air is incident at an angle to a surface of (12.0 + A) degrees on a piece of glass with an index of refraction of (1.10 + (B/100)). What is the angle between the surface and the light ray once in the glass? Give your answer in degrees and rounded to three significant figures.

A = 12

B = 18

Answer:

18.5⁰

Explanation:

Angle of incidence i = 12.0 + A

A = 12

= 12.0 + 12

= 14

Refractive index u = 1.10 + B/100

= 1.10 + 18/100

= 1.10 + 0.18

= 1.28

We then find the angle of refraction index u

u = sine i / sin r

u = sine24/sinr

1.28 = sine 24 / sine r

1.28Sine r = sin24

1.28 sine r = 0.4067

Sine r = 0.4067/1.28

r = sine^-1(0.317)

r = 18.481

= 18.5⁰

4 0
2 years ago
how do I solve how much time does it take for a satellite moving 15000 miles per hour travel to travel once around the earth 249
iogann1982 [59]

Answer:

The time taken by the satellite to orbit earth at its surface, t = 1.66 hr

Explanation:

Given data,

The velocity of the satellite, v = 15000 miles/hr

The distance of travel, d = 24901 miles,

It is equal to the circumference of earth,

So the time taken by the satellite to orbit earth at its surface,

                           v = d/t

                            t = d/v

Substituting the given values in the above equation,

                            t = 24901 / 15000

                              = 1.66 hr

Hence, the time taken by the satellite to orbit earth at its surface, t = 1.66 hr

3 0
3 years ago
Other questions:
  • a. Convert 21.0 cm to inches. Show your dimensional analysis setup. b. Convert 29.7 cm to inches. Show your dimensional analysis
    11·1 answer
  • The graph shows how the vertical velocity of a parachutist changes from the moment the parachutist jumps from the aircraft until
    7·1 answer
  • The position vector of a particle of mass 2 kg is given as a function of time by ~r = (5 m) ˆı + (5 m/s)t ˆ . Determine the mag
    10·1 answer
  • Newton’s second law of motion addresses the relationship between what two variables that influence the force on a body?
    10·2 answers
  • Which is not an advantage of radio telescopes over optical telescopes?
    10·1 answer
  • Guys I need help with my homework please !!!!
    6·1 answer
  • A hawk flies in a horizontal arc of radius 12.0 m at constant speed 4.00 m/s. (a) Find its centripetal acceleration. (b) It cont
    9·1 answer
  • The graph represents the change in that occurs when food is cooked over a charcoal grill. Which statement correctly explains the
    9·1 answer
  • explain how a deflection magnetometer can be used to find the horizontal component of the Earth's magnetic field​
    5·1 answer
  • 4. What is the coefficient of x in the expression x + 3y + 2?<br> A. 0<br> B. 1<br> C. 2<br> D. 3
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!