1. Given the following (5 pts) E = 500 S = 700 J = 1 T =60 I = 40 Determine the
ID: 3542118 • Letter: 1
Question
1. Given the following (5 pts)
E = 500
S = 700
J = 1
T =60
I = 40
Determine the truth value of the following compound conditions
a. E >400 Or J = 1
b. S=700 and T=500
c. S-T= 640 And Not (J=1)
d. T+ 1= S-500 and J= 0
e. S < 300 And Not (I < 50 Or J=1)
2. Write a series of code statements to perform the logic shown in the following figure. You have to declare variables and use if
Given the two valid programs below, how many times does the statement intDiff = intDiff - 10 execute before the loop terminates? intDiff=1 For intcount=1 to 100 intDiff=intDiff+intCount If intDiff>25 Then Exit For End If intSiff=intDiff-10 Next intDiff=50 intCount=-5 Do while intCountExplanation / Answer
1. Given the following (5 pts)
E = 500
S = 700
J = 1
T =60
I = 40
Determine the truth value of the following compound conditions
a. E >400 Or J = 1
since E = 500 > 400 which is true . in or condtion it wont check other side so.
E >400 Or J = 1 = true
b. S=700 and T=500
S=700 is true and T=500 is false thus
true and false = false;
S=700 and T=500 = false;
c. S-T= 640 And Not (J=1)
S-T = 700-60 = 640 true
J=1 true
not (j=1) = false
so S-T= 640 And Not (J=1) = true and false = false
S-T= 640 And Not (J=1) = false
d. T+ 1= S-500 and J= 0
T+1 = 60+1 = 61 = 500-500 = 0
61!=0 so T+1 = S-500 is false
so false and anything will be false;
T+ 1= S-500 and J= 0 false;
e. S < 300 And Not (I < 50 Or J=1)
S<300 = 700 < 300 is false thus
so false and anything will be false;
S < 300 And Not (I < 50 Or J=1) = false;
2. Write a series of code statements to perform the logic shown in the following figure.
You have to declare variables and use if
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.