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
Calculate the charge that flows through the cell in 1 minute. Each filament lamp has a power of 3 W and a resistance of 12 Ω
lapo4ka [179]

Answer:

24 Coulumbs

Explanation:

Given data

time= 1 minute= 6 seconds

P=2 W

R= 12 ohm

We know that

P= I^2R

P/R= I^2

2/12= I^2

I^2= 0.166

I= √0.166

I= 0.4 amps

We know also that

Q= It

substitute

Q= 0.4*60

Q= 24 Columbs

Hence the charge is 24 Coulumbs

5 0
3 years ago
An woman whose weight is 804 N stands on a long horizontal plank of wood 1.55 m from one end. The plank is uniform and is suppor
meriva

Answer:

Explanation:

There will be reaction force by  each vertical post on horizontal plank . Let it be R₁ and R₂ . R₁ is reaction force by the post nearer to woman

Taking torque of all forces about the end far away from the woman

Torque by reaction force = R₁ x 5.5

= 5.5 R₁ upwards

Torque by weight of woman in opposite direction , downwards

= - 804 x ( 5.5 - 1.55 )

= - 3175.8

Torque by weight of the plank in opposite direction , downwards .

= - 27 x 5.5 / 2

= - 74.25

Torque by R₂ will be zero as it passes through the point about which torque is being taken .

Total torque

= 5.5 R₁ - - 3175.8 - - 74.25  = 0 ( For equilibrium )

5.5 R₁ = 3250

R₁ = 590.9 N .

6 0
3 years ago
Please help, <br> What does a Transverse and longitude wave combine to form?
Wewaii [24]
Electromagnetic waves<span> transfer energy without going through a medium. ... Sometimes, a </span>transverse wave<span> and a </span>longitudinal wave can combine to form<span>another </span>kind<span> of </span>wave<span> called a surface </span>wave<span>. </span>Transverse Waves<span>. </span>Waves<span> in which the particles vibrate in an up-and-down motion

</span>
4 0
3 years ago
Read 2 more answers
A 100 kg individual consumes 1200 kcal of food energy a day. Calculate
IrinaK [193]

Answer:

(a) 5142.86 m

(b) 317.5 m/s

(c) 49.3 degree C

Explanation:

m = 100 kg, Q = 1200 kcal = 1200 x 1000 x 4.2 = 504 x 10^4 J

(a) Let the altitude be h

Q = m x g x h

504 x 10^4 = 100 x 9.8 x h

h = 5142.86 m

(b) Let v be the speed

Q = 1/2 m v^2

504 x 10^4 =  1/2 x 100 x v^2

v = 317.5 m/s

(c) The temperature of normal human body, T1 = 37 degree C

Let the final temperature is T2.

Q = m x c x (T2 - T1)

504 x 10^4 = 100 x 4.1 x 1000 x (T2 - 37)

T2 = 49.3 degree C

4 0
3 years ago
why did thomson's from experermenting with cathode rays cause a big change in scientific thought about atoms
WARRIOR [948]

Answer:

His results gave the first evidence that atoms were made up of smaller particles.

7 0
3 years ago
Other questions:
  • What is the job of chlorophyll in photosynthesis?
    6·2 answers
  • What is the absolute value of the horizontal force that each athlete exerts against the ground?
    10·1 answer
  • Compare and contrast the general characteristics of a gas giant planet and one of the inner planets (such as Mercury, Earth, Ven
    8·1 answer
  • 1) There are many positive and negative aspects associated with nuclear power. Which is a negative aspect associated with nuclea
    14·1 answer
  • When there is no number in front of a chemical formula in a chemical equation, what number is understood?
    9·1 answer
  • A paper filled capacitor is charged to a potential difference of 2.1 V and then disconnected from the charging circuit. The diel
    15·1 answer
  • Moving a neutral wire in a(n) ____ field will induce a(n) _____.
    15·1 answer
  • Which of the following statements apply to electric charges?
    5·1 answer
  • What is international system of units?​
    15·2 answers
  • A brick is thrown upward from the top of a building at an angle of 10° to the horizontal and with an initial speed of 16 m/s. If
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!