Question

Exercise: Evaluate This Expression y = 7 z = 12 a = True blue C = green 6 50 WN if not ((((not (x < y)) and (y >= z)) or (n
***The answer has to be in python3***
***Before answering the question make sure it has no errors***
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Syntax:

if not expr1:

example:

if not x

If x is True, then not will evaluate as false, otherwise, True.

Python program that uses if not

Initial animal values.

animal1 = "bird"

animal2 = "bird"

if not animal1 == animal2:

print(2)

// The above code will print 2.

Now let us correct our code and evaluate it

---------------------------------------------------------------------

correct code:

x = 5
y = 7
z = 12
a = True
b = 'blue'
c = 'green'
if not ((not(x < y)) and (y >= z)) or (not(a)) and (b == c):
print('Yes !')
else:
print('No!')

---------------------------------------------------------------

Solutions 2-5 y=7 2 =12 a= True b=blue g=green if not ((notacy) and not ((notacy and Cy>=2)) or (notca)) and (b==c): hell

Add a comment
Know the answer?
Add Answer to:
***The answer has to be in python3*** ***Before answering the question make sure it has no...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • please make sure to give the answer for the second question. #2. (24 points) Let X...

    please make sure to give the answer for the second question. #2. (24 points) Let X and Y have joint density f(x,y) = 60xy2, 0<x<1, 0<y<1, x+y<1. (a) Find the marginal pdf of Y. Use it to find E(Y) (b) Give an integral expression for P(X + Y <0.75), but do not evaluate. (C) Give an integral expression for E(XY), but do not evaluate. Optional two point bonus problem. In Problem 2 above, is the distribution of Y skewed to...

  • please answer both question 6 and 7 and make sure its correct before answering. 6. Use...

    please answer both question 6 and 7 and make sure its correct before answering. 6. Use on-line resources to find out the lipid profile and composition in peanuts, avocado, cow liver and egg 7. User on-line resources to learn how researches use thin layer chromatography to identify various types of lipids present in food samples.

  • Background to this question Functions can return booleans, which is often convenient for hiding complicated tests...

    Background to this question Functions can return booleans, which is often convenient for hiding complicated tests inside functions. For example: def is_divisible(x, y): if x % y == 0: return True else: return False It is common to give boolean functions names that sound like yes/no questions; is_divisible returns either True or False to indicate whether x is divisible by y. Here is an example: >>> is_divisible(6, 4) False >>> is_divisible(6, 3) True The result of the == operator is...

  • Please answer both (a) and (b) and code using Python3. Exercise 8.3 The Lorenz equations One...

    Please answer both (a) and (b) and code using Python3. Exercise 8.3 The Lorenz equations One of the most celebrated sets of differential equations in physics is the Lorenz equations: dx dz ar=0(y-x), dr where σ r, and b are constants. (The names σ, r, and bare odd, but traditional-they are always used in these equations for historical reasons.) These equations were first studied by Edward Lorenz in 1963, who derived them from a simplified model of weather patterns. The...

  • make sure is done in excell Open the Excel program Suppose we want to know the...

    make sure is done in excell Open the Excel program Suppose we want to know the standard normal distribution up to the given value. That is P(Z <a). Lets use Excel instead of the standard normal distribution table In cell A1 type mean. In cell B1 type 0. That means that we are letting mean be zero. click on cell A2 and type SD. In cell B2 type 1. That means that we are letting standard deviation be one. That...

  • just number 8 6. 20 = Find zo if (a) Find zb if (b) Find zc...

    just number 8 6. 20 = Find zo if (a) Find zb if (b) Find zc if (c) P(-20 < < < zo) = 0.3400 P(Z < zb) = 0.3015 P(Z > ze) = 0.7995 zb = 7. Find x if P(X< x) = 0.6179 X is the normal r.v. N(10,2). x = .. 8. Find y if P(Y<y) = 0.9729, Y is normal r. vN (0,4) y = ........ (a) Find P(x > 110) ifr.v. X = N(100, 102)....

  • Question 410 marks Consider the nonlinear system ェ=(1-y)2(4-12), ỳ=(1-z)y(y2-4) (0<x<2, o<y<2), which has a single fixed...

    Question 410 marks Consider the nonlinear system ェ=(1-y)2(4-12), ỳ=(1-z)y(y2-4) (0<x<2, o<y<2), which has a single fixed point at (1,1) (a) Show that the following expression for K(x, y) is a constant of motion for this system: K(x, y)- 2 ln(ry) + Inl( 2)(y- 2)]-3In(2)(y+2)]. (b) Use the constant of motion to show that the fixed point is a centre of the nonlinear system.

  • UU UTIJICICU Question 7 < > Use Mathematica to factor the expression 28 - 6x? +...

    UU UTIJICICU Question 7 < > Use Mathematica to factor the expression 28 - 6x? + 9x® + 4096x2 - 24576x + 36864. One of the resulting factors has the form (z? + M). Enter the value of M below. M= Submit Question Question 8 < > Define the function f(x) = a* - 523 – 6x2 + 23 on Mathematica. Then evaluate and expand the expression f(3w + 2). The result should be a polynomial in the variable w....

  • QUESTION 7 Which of the following is a valid C++ assignment statement? (assume each letter is...

    QUESTION 7 Which of the following is a valid C++ assignment statement? (assume each letter is a different variable) A.y=b-c B.y +z = x C.x = a bi D.x = -(y*z): Ex = (x + (y z): QUESTION 8 Which of the following is a valid variable name according to C++ naming rules? A 2ndName B.%Last_Name C@Month D#55 Eyear03 QUESTION 9 Which library must be included to enable keyboard input? A kbdin B. cstdlib C input Diostream E lomanip QUESTION...

  • 1. [10] Given the declarations: signed char0x05, y 0x0A, z 0x2F: we are using 1 byte...

    1. [10] Given the declarations: signed char0x05, y 0x0A, z 0x2F: we are using 1 byte 8 bits Evaluate each of the following. Give the answers as two hexadecimal characters a) 9 b) x-y c) x^y d) (x <<2) &z c) (x A y)loz) 2. [10] Suppose we are using a machine with that uses 7 bits to store a float value with 3 bits for the exponent in the manner of the IEE 754 standard. (Hint: the bias would...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT