Print this page and answer the question without using Python. Here are some Python variables: X = 5 y = 10 z = -3 For each of the following expressions, indicate whether the expression evaluates to True or False or Error. 1. x > 5 2. x >=5 3. Z != -1 4. x <= 5 5. y >= X 6. 0 7. 4/2 Z > 0 = = y / x 8. y % 2 == 0 9. y + 2 x != 30 10. y> 0 == x > 0 11.- * -1 y == -10 12. X == "5"

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 30PE
Question

For each of the following expressions, indicate whether the expression evaluates to True or False or Error.

Important note: first solve these expressions by hand on paper without using Python or IDLE. Then check your answers using Python (IDLE).

Now: in addition to submitting your answers, let me know how many did you get correct/incorrect, and for the questions that were incorrect, do you understand why this happened? Describe your responses. 

 

Print this page and answer the question without using Python.
Here are some Python variables:
X = 5
y = 10
Z = -3
For each of the following expressions, indicate whether
the expression evaluates to True or False or Error.
1. x > 5
2. X >=5
3. Z != -1
4. x <= 5
5. y >= X
6. 0
Z > 0
7. 4/2 = y / x
8. y % 2 == 0
9. y + 2
10. y> 0 == x > 0
*
11.-1 y == -10
12. X == "5"
-
*
x != 30
Transcribed Image Text:Print this page and answer the question without using Python. Here are some Python variables: X = 5 y = 10 Z = -3 For each of the following expressions, indicate whether the expression evaluates to True or False or Error. 1. x > 5 2. X >=5 3. Z != -1 4. x <= 5 5. y >= X 6. 0 Z > 0 7. 4/2 = y / x 8. y % 2 == 0 9. y + 2 10. y> 0 == x > 0 * 11.-1 y == -10 12. X == "5" - * x != 30
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT