Tutorial 4 KE17503 (print).pdf - KE 17503 Engineering Programming 1920(1 Tutorial 4 1 Determine if the following conditions are true or false Assume

Tutorial 4 KE17503 (print).pdf - KE 17503 Engineering...

This preview shows page 1 - 2 out of 2 pages.

KE 17503 Engineering Programming 1920(1) Tutorial 4 1) Determine if the following conditions are true or false. Assume that the following variables have been declared and given these values: a = 5.7, b = 1.1 and k = -3. a) k != a – b b) a < 10 && a > 5 c) –k <= k + 6 d) ! (a == 3 * b + 1) e) Write a program indicates the conditions in 1(a) to 1(d) whether true or false. 2) Write the complement expression for the following original expression. a) !(x < y) b) !(x >= y) c) !(x == 3 * y - 1) d) !(x/y != x/3) e) Given that x and y are integers with the value of 8 and 3 respectively. Write a program shows the condition (1 or 0) of the original expression is same with its complement expression. 3) De Morgan’s Rule governs the complementing of operators when we want to make the total expression positive by removing the parentheses. Consider the expression shown below. !(x || y && !z || !t || !u && x) a) What is the complementing of operators for the expression? b) Given that x = y = 0, z = 100, t = -4 and u = 1. What is the condition for the given expression?
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Summer '16

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes