The University Of Jordan - Aqaba Faculty of information technology and Systems Department of computer information systems Humanities Computer Skills Problem solving worksheet Student number: Student name: Class Time: No. Question Which of the following assignment statements is correct: 1. Choice 1 x-2 = y+4 Choice 2 A+ B = 3 Choice 3 4=Y Choice 4 A= B + 3 String Boolean 2. The following data is a type of : "3.564" Integer Real 3. If x = 3>5 , then the suitable data type for x is: Integer Boolean 4. The value of X after solving the following equation is: X = 3 * 4 + 8 * 2 ^ -3 - 20 Mod 17 + 27 / 3 ^ 3 12 11 1 3 5. The value of Y after solving the following equation is: Y = 5 Mod 7 + 17 Mod 8 / (2 * 3 + 2 * 1 ^ -3) – 10 -5 -4 -10 5 6. The value of Z after solving the following equation is: Z = 6^2^ 1/(8*2 +2)-5 +33 Mod 10 + 7 ^ 2 - (3 + (2*2/2+1)) 40 43 15 47 7. The value of M after solving the following equation is: M = 4+3 >= 2*3 Or Not (Not True And 5^2 + 1<>2 *10 + 5) False True 15 0 8. The value of G after solving the following equation is: G = 14 / 2 Mod 3 <= 4 And Not (35 Mod 3 * 9 = 8) True False 7 9 9. The value of Y after solving the following equation is: Y = 5 <> 5 Or (Not (Not (6 + 2 = 16 / 2) And 6 <> 2 ^ 2 + 2)) True False 5 0 10. The error in the following flowchart is: 11. What are the suitable words to be filled in the blanks so that the following pseudo code will: The symbol used for the start statement 2. 10 3. x The symbol used for the input statement 2. 10 3. 10 String Real The symbol used for y=y+3 2. 20 3. x No error 2. 10 3. x 1 12. Print the even numbers between 10 and 20. 4. 2 4. 2 1. Start 5. <= , step 3 5. <= , step 3 2. x = _______ 3. Print ______ 4. x = x +_____ 5. if x___ 20 then goto _____ 6. Stop 1.Start Which one of the following pseudo codes solve the following 1.Start 2.x=10 2.x=1 problem: Printing numbers from 10 to 1 in descending order 3.Print x 4.x=x-1 5.If x>=1 6.Stop 3.Print x 4.x=x-1 5.If x<=10 then goto 3 6.Stop then goto 3 13. What is the output for the following flow chart: 2 10 2 8 14. What is the output for the following code: 8 5 4 1 2 4. 2 5.>= , step 3 1.Start 2.x=10 3.Print x 4.x=x+1 5.If x<=1 4. 1 5.< ,step 2 None of them then goto 3 6.Stop No output None of them 8 5 None of them 6 Assume that the inputs are: 4, 1, 2, 3 1. Start 2. a = 4 3. Input x 4. If a mod x = 0 then goto 6 5. goto 9 6. x= x + a 2 7. print x 8. goto 3 9. Stop 15. What is the output for the following flowchart? Assume that the inputs are: 13 9 12 7 13 9 12 7 9 12 9 13 7 3 16. Write the equivalent Pseudo Code for the following flowchart 1. Start 2. Let x=8, y= 12 3. If x+y>10 then a) decrement y by 10 b)print x, y 4. Increment x by 2 5. If x-y<>2 then print “Test” 6. Stop 1. Start 2. Let x=8, y= 12 3. If x+y > 10 then a) decrement y by 10 b) print x, y else Increment x by 2 4. If x-y<>2 then print “Test” 5. Stop 1. Start 2. Let x=8, y=12 3. If x+y> 10 then decrement y by 10 else Increment x by 2 4. print x, y 5. If x-y<>2 then print “Test” 6. Stop None of them 17. What is the output for the following flowchart: 2 4 5 5 8 2 4 5 8 None of them 8 4 18. The equivalent Pseudo Code for the flowchart in question 17 is: 1. Start 2. let n=2, m=4 3. Print n, m 4.Increment n by 3 5.If n<=4 then print n, m 6.Increment m by 4 7.Print n, m 8. Stop 1. Start 2. let n=2, m=4 3. Print n, m 4.Increment n by 3 5.If n<=4 then goto step 3 6. Increment m by 4 7. Print n, m 8. Stop 1. Start 2. let n= 2, m=4 3. print n, m 4.Increment n by 3 5.If n<=4 then increment m by 4 6.Print n, m 7. Stop None of them 19. What is the output for the following Pseudo code? 1. Let x=24 2. Calculate: y = x mod 3 3. decrement x by 1 4. Print y 5. If x>=22 then goto step 2 else Stop What is the output for the following flowchart: Assume that c= 15: 0 1 2 0 0 0 2 1 0 0 2 1 6 8 None of them 20. 6 4 5 7 5
© Copyright 2024 Paperzz