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
What is the purpose of the graphic language?
solmaris [256]

Answer:

enables the representation, analysis and communication of various aspects of an information system. These aspects correspond to varying and incomplete views of information systems and the processes therein.

5 0
3 years ago
When comparing solids to fluids, the following is true: for elastic solids, the stress must be normal. For Newtonian fluids, the
Nat2105 [25]

Answer: D

Find the answer in the explanation

Explanation:

Elastic solid will obey Hooke's law which state that the force applied is proportional to the extension provided the elastic limit is not exceeded.

Examples of Newtonian fluid are water, glycerol, honey and all organic solvents

When comparing solids to fluids, the below statement is true

We can therefore conclude that

For elastic solids, stress is linearly related to strain, and for Newtonian fluids, stress is linearly related to strain rate

4 0
4 years ago
Storm sewer backup causes your basement to flood at the steady rate of 1 in. of depth per hour. The basement floor area is 2600
Wittaler [7]

Answer:

attached below

Explanation:

4 0
3 years ago
True/False
kvv77 [185]

Answer:true

Explanation:

4 0
2 years ago
Polymers can be natural or synthetic. a)-True b)- false?
Olenka [21]

Answer:

TRUE

Explanation:

Polymers can be natural as well as synthetic

The polymer which are found in nature are called natural polymer tease polymer are not synthesized, they are found in nature

Example of natural polymers is cellulose, proteins etc

On the other hand synthetic polymers are not found in nature they are synthesized in market

There are many example of synthetic polymer

Example : nylon, Teflon etc  

So it is a true statement

8 0
4 years ago
Other questions:
  • A charge of 11.748 nC is uniformly distributed along the x-axis from −2 m to 2 m . What is the electric potential (relative to z
    9·1 answer
  • "At 195 miles long, and with 7,325 miles of coastline, the Chesapeake Bay is the largest and most complex estuary in the United
    6·1 answer
  • What is a two stroke engine and what is a four stroke engine, please keep the definitions as simple as can be and please explain
    8·2 answers
  • By conducting a survey, Sarah and Jesse determine that an “open space” is home to over fifty different species of plant life.
    7·2 answers
  • What are the effects of applying an additional layer of insulation to a cylindrical pipe or a spherical shell?
    7·1 answer
  • The ground temperature a few meters below the surface is fairly constant throughout the year and is near the average value of th
    9·1 answer
  • Help please!
    13·1 answer
  • Ideias de nomes para um gato (macho), foto no anexo.​
    5·1 answer
  • If an elevator repairer observes that cables begin to fray after 15 years, what process might he or she use to create a maintena
    11·1 answer
  • Label each of the line types in the drawing below. ( will not mark you brainlest or whatever if you don't at least try to help)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!