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
myrzilka [38]
3 years ago
10

Put these expressions in a small program that will demonstrate whether they are true or false. Paste the code, and output from t

he program into your submission. Use if statements and output a message indicating that the expression is True or False.
Engineering
1 answer:
love history [14]3 years ago
6 0

complete question:

Put these expressions in a small program that will demonstrate whether they are true or false. Paste the code, and output from the program into your submission. Use if statements and output a message indicating that the expression is True or False.

a = 5,  b = 4,  c = 3,  d = 2 ;

(a <= b + 1 )

(a < b && c > b)

(a >= c || d >= 5)

( !(a > b) )

( b >= a && ! (d < b) )

Answer:

a = 5

b = 4

c = 3  

d = 2

if a <= b + 1 :

       print("True")

else :

      print("False")

if a < b and c > b :

      print("True")

else :

      print("False")

if a >= c or d >= 5:

       print("True")

else :

       print("False")

if not(a > b):

       print("True")

else :

       print("False")

if ( b >= a and not(d < b) ):

       print("True")

else :

      print("False")

Explanation:

I used python to write the code

The equivalent of && in python is and while the equivalent of || is or. The equivalent of !  is not  in python .

I wrote an if statement to print True for each expression if it is actually true and the else statement print False if the expression is actually false.

For example the first expression says if a is less than or equal to b + 1(5). This statement is actually true so the expression will print True. a is 5 and b plus 1 is 5, so a is equal to 5 which is true.

if a < b and c > b :

Both expression must be true for the if statement to print True.  a is not less than b and c is not greater than b so the expression amount to False.

if a >= c or d >= 5:

One expression must be true for the expression to be True. a >= c is true and d >= 5 is false. So the expression amount to True.

not(a > b)

This simply means negate the statement a > b . This gives False.

( b >= a and not(d < b))

b >= a is false

d < b is true

not(d < b) is false

false and false is definitely False

You might be interested in
A permanent magnet DC motor has an armature resistance of 0.5 Ω and when a voltage of 120 V is applied to the motor it reaches a
BaLLatris [955]

Answer:

12 N-m

Explanation:

The dc motor is operating at 24 V that is its terminal voltage V =24 V

Armature resistance  = 0.2 ohm

No load speed = 240 radian /sec

For motor we know that  as the motor is on no load so  so

Power developed in the motor

Now we know that power = torque× angular speed

So

3 0
3 years ago
Rod of steel, 200 mm length reduces its diameter (50 mm) by turning by 2 mm with feed speed 25 mm/min. You are required to calcu
diamong [38]

Answer:

125 cm³/min

Explanation:

The material rate of removal is usually given by the formula

Material Rate of Removal = Radial Depth of Cut * Axial Depth of Cut * Feed Rate, where

Radial Depth of Cut = 25 mm

Axial depth of cut = 200 mm

Feed rate = 25 mm/min

On multiplying all together, we will then have

MRR = 25 mm * 200 mm * 25 mm/min

MRR = 125000 mm³/min

Or we convert it to cm³/min and have

MRR = 125000 mm³/min ÷ 1000

MRR = 125 cm³/min

4 0
3 years ago
Consider a simple ideal Rankine cycle with fixed boiler and condenser pressures. If the steam is superheated to a higher tempera
Usimov [2.4K]

Answer:

Option D - the moisture content at turbine exit will decrease

Explanation:

In an ideal rankine system, the phenomenon of superheating occurs at a state where the vapor state of the fluid is heated above its saturation temperature and the phase of the fluid is changed from the vapor phase to the gaseous phase.

Now, a vapour phase has two different substances at room temperature, whereas a gas phase consists of just a single substance at a defined thermodynamic range, at standard room temperature.

At the turbine exit, since it's just a single substance in gaseous phase, it means it will have less moisture content.

Thus, the correct answer is;the moisture content at turbine exit will decrease

4 0
3 years ago
When you see a street with white markings only, what kind of street is it?
Georgia [21]

Answer:

it's a one way street

3 0
4 years ago
Express the Internal Energy and Entropy as a Function of T and V for a homogeneous fluid. Develop the same relations using the i
DedPeter [7]

Answer:

dU=C_{v} dT+(T(\frac{\beta }{\kappa })  -P)dV

dS=C_{v} \frac{dT}{T} +(\frac{\beta }{\kappa } ) dV

Explanation:

The internal energy is equal to:

dU=C_{v} dT+(T(\frac{\delta P}{\delta T} )_{v} -P)dV

The entropy is equal to:

dS=C_{v} \frac{dT}{T} +(\frac{\delta P}{\delta T} )_{v} dV

If we write the pressure derivative in terms of isothermal compresibility and volume expansivity, we have

\frac{\delta P}{\delta T}=\frac{\beta }{\kappa }

Replacing:

dU=C_{v} dT+(T(\frac{\beta }{\kappa })  -P)dV

dS=C_{v} \frac{dT}{T} +(\frac{\beta }{\kappa } ) dV

4 0
3 years ago
Other questions:
  • Oliver is designing a new children's slide to increase speed at which a child can descend.His first design involved steel becaus
    6·1 answer
  • A HSS152.4 × 101.6 × 6.4 structural steel [E = 200 GPa] section (see Appendix B for crosssectional properties) is used as a colu
    9·1 answer
  • A wall in a house contains a single window. The window consists of a single pane of glass whose area is 0.15 m2 and whose thickn
    10·1 answer
  • Write a C program that will update a bank balance. A user cannot withdraw an amount ofmoney that is more than the current balanc
    13·1 answer
  • What is the angle of the input
    12·1 answer
  • What truck you like the best
    9·2 answers
  • How do u walk dogs and they have to park in the car
    10·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • In this unit, you looked at modern vehicle technology and the ad-
    11·1 answer
  • 10. In CCS, Northing and Easting are
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!