Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Prelim cheat sheet 1, Cheat Sheet of Programmable Logic Controllers

Cheat Sheet for prelim examination

Typology: Cheat Sheet

2020/2021

Uploaded on 04/08/2021

jacinth-hernandez
jacinth-hernandez 🇵🇭

1 document

Partial preview of the text

Download Prelim cheat sheet 1 and more Cheat Sheet Programmable Logic Controllers in PDF only on Docsity! Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM CPEN21A – PROGRAMMING LOGIC AND DESIGN 1 ST Semester / Summer A.Y. 2019-2020 Prelim Midterm Pre-Final Finals ------------------------------------------------------------------------------------------------------------------------------------ - GENERAL DIRECTIONS:  Use the answer sheet provided for your answer.  What is being asked by each of the following items? Choose the letter that corresponds to your answer.  If your answer is not found on the choices, shade Letter E. TOPIC 1. ROGRAMMING METHODOLOGY 1. Which statement support the most important role of a systems analyst in business? A. technical understanding of information systems B. problem solving C. knowing what data needs to be stored and used D. special programming skills 2. What is the function of the analyst’s approach to problem solving? A. Verify that the benefits of solving the problem outweigh the costs, then research and understand the problem. B. Develop a set of possible solutions, then verify that the benefits of solving the problem outweigh the costs. C. Verify that the benefits of solving the problem outweigh the costs, then define the requirements for solving the problem. D. Implement the solution, then define the details of the chosen solution. 3. This represents the last step of the analyst's approach to problem solving. A. Decide which solution is best, and make a recommendation B. Monitor to make sure that you obtain the desired results C. Verify that the benefits of solving the problem outweigh the costs D. Implement the solution 4. Choose the best statement that apply the primary objective of the analysis phase. A. analyze the capabilities and structure of the previous system B. prioritize the alternatives for a new system C. determine the basic structure and approach for the new system D. understand and document the users' needs and requirements 5. Which statement support that problem domain is the part of systems development? A. problems associated with the computing environment B. area of the user's business for which a system is being developed C. problems of the organization of the company D. area of the industry that results in more intense competition Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 CEIT- QF - 02 Score: Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM 6. Identify which two phases that the users are typically more involved during the project? A. Analysis and design B. Planning and analysis C. Design and implementation D. Analysis and implementation 7. Identify the first official activity of the project team as it initiates the project planning phase. A. define the business problem B. staff the project team C. develop a cost/benefit analysis D. write a project proposal 8. Most new information systems must communicate with other existing systems, so the design of the method and details of these communication links must be precisely defined. These are called? A. Models B. system interfaces C. help desks D. design interfaces 9. Discuss the term means that work activities are done once, then again, and yet again. A. eXtreme programming (XP) B. iteration C. agile modeling D. Unified Process (UP) 10. Discuss the term refers to an approach that completes parts of a system in one or more iterations and puts them into operation for users. A. incremental development B. information engineering (IE) C. Unified Process (UP) D. structured design 11. Define the term used in system development which is a collection of guidelines that help an analyst complete a system development activity or task. A. Iteration B. Model C. Technique D. Tool 12. Define the critical component of any new system. A. project management application B. user interface C. reverse engineering tool D. code generator tool Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM 27. Select the correct statements about logical AND and OR operators. A. a AND b is true if either a or b is true B. a OR b is true if either a or b is true C. (a OR b) AND c is true if c is true and either a or b is true D. a AND b is false if both a and b are true 28. Jim currently runs a car rental dealership and wishes to write a program that allows the user to enter in the temperature of the location they plan to visit and then recommend a car based on the data. Below is a summary of the program structure Jim is looking for. - Temp greater than 80 a Convertible should be selected. - Temp greater than 60 and less than 80 a SUV should be selected. - Temp less than 60 a truck should be selected. Jim has no trouble writing the code if the temperate is greater than 80 but gets stuck when he arrives at the second line of code which reads Temp greater than 60 and less than 80 a SUV should be selected. What type of operator is Jim needing to use within his code? A. and B. or C. not D. == 29. Given the algebraic equation y = ax^3 + 7, which of the following, if any, are correct Python statements for this equation? A. y = a * x * x * x + 7 B. y = a * (x * x * x) + 7 C. y = a * x * x * ( x + 7 ) D. y = a * ( x ** 3) + 7 30. Do a walk-through to find the value assigned to e. Assume that all variables are properly declared. a = 3 b = 4 c = (a % b) * 6 d = c // b e = (a + b + c + d) // 4 A. 6 B. 7 C. 8 D. 9 31. Suppose x, y, z, and w are variables. What value is assigned to w of these variables after the last statement executes? Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM x = 4 y = 11 z = y - 2 * x x = z + y y = x + 5 * z w = x - y + 2 * z x = y + w - x –w A. -9 B. 9 C. -(-9) D. 9.0 32. Suppose x, y, z, w and t are variables. What value is assigned to t of these variables after the last statement executes? x = 23 y = 35 x = x + y / 4 - 3 z = x % 3 w = 28 // 3 + 6.5 * 2 t = x / 4.0 + 15 % 4 - 3.5 A. 2.375 B. 2.875 C. 3.500 D. 11.575 For Questions 33-39. Shade letter A and C if the expression is True, otherwise, shade letter B and D if the expression is False. 33. Evaluate the given expression where x = 10 and y = 1 ( ( not( x < 5 ) and ! ( y >= 7 ) ) and ( not( ( x < 5 ) or ( y >= 7 ) ) ) ) Answer: Letter E, the condition will not evaluate as True or False due to some invalid syntax error. 34. Evaluate the given expression where a = 3, b = 3, g = 5, x = 10, and y = 1 ( ( not( a == b ) or not( g != 5 ) ) and ( not( ( a == b ) and ( g != 5 ) ) ) ) Answer: Letter A and C, the condition will evaluate as True. 35. Evaluate the given expression where x = 10, and y = 1 not ( not( ( x <= 8 ) and ( y > 4 ) ) and ( not( ( x <= 8 ) or ( y > 4 ) ) ) ) Answer: Letter B and D, the condition will evaluate as False. 36. Evaluate the given expression where i = 2, and j = 9 Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM not(not( ( i > 4 ) or ( j <= 6 ) ) and not( ( i > 4 ) and ( j <= 6 ) ) ) Answer: Letter B and D, the condition will evaluate as False. For Questions 37-39. If x = 5, y = 6, and z = 4, evaluate each of the following statements. 37. (x != 5) and (y != z) Answer: Letter B and D, the condition will evaluate as False. 38. x >= z or (x + y >= z) Answer: Letter A and C, the condition will evaluate as True. 39. (x <= y - 2) and (y >= z) or (z - 2 != 20) Answer: Letter A and C, the condition will evaluate as True. TOPIC 4. FLOWCHART 40. Study the flow chart given below and the questions that follow. A. 32 B. 15 C. 14 D. None of these Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM 42. For an individual who works for a government organization and owns a house, it is given that he is 35 years old and earns P15,000 per month. What would be the approved_amt for him? A. P1,500,000 B. P1,875,000 approved_amt = sal * 5 * (60 - age) = 15,000 * 5 * (60 - 35) = 1,875,000 C. P1,600,000 D. P2,050,000 43. A person wishes to apply for a loan worth P2,000,000. Person does not own a house and also does not work for a government organization. Will he get this loan approved if he draws a salary of P50,000 and his current age is 26 years? A. Yes, if his age is less than 40. B. No, he would not get this amount. C. Yes, he would get this amount. D. Yes, if his age is less than 40. Answer: Option B Explanation: approved_amt = sal * (60 - age) = P50,000 * (60 - 26) = P1,700,000 So, the loan will not be approved for the person mentioned in the question. According to the given flow chart, highest approved amount of loan for the man is: P50,000*(60- 26)=P1,700,000 Loan of P2,000,000 can't be approved. 44. A person wishes to avail a loan of P50, 00,000. He works for a government organization and does not own a house. Would he get the loan if he draws a salary of P60,000 and his age is 28 years? If he does get a loan, what amount would he be entitled? If not, by what amount he would be short of the required amount? A. Yes, he would get a loan equal to P5,760,000. B. Yes, he would get a loan exactly equal to P5,000,000. C. No, he would not get a loan. He would be short of P700,000. D. No, he would not get a loan. He would be short of P760,000. Answer: Option A Explanation: approved_amt = sal * 3 * (60 - age) approved_amt = P60,000 * 3 * (60 - 28) approved amt = P5,760,000. So, yes, he would get a loan equal to P5,760,000. approved_amt=60000*3*(60-28)=P5,760,000 Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM For Questions 45-47. Study the flow chart shown below to answer the following questions. 45. In which situation can this flowchart get stuck in an infinite loop? A. When N >= 0 B. When N <= 0 C. When N > M or F D. will never enter in infinite loop Answer: Option B Explanation: From the flowchart it is evident that M will always be a natural number equal to or greater than 1. For values of N less than or equal to 0 the flowchart will get struck in an infinite loop. 46. Which of the following correctly represents the bug present in this flowchart? A. Not handled for N = M B. Not handled for N <= 0 C. Not handled for N > M D. Not handled for natural numbers as N Answer: Option B Explanation: The values of N equal to or less than 0 will make the flowchart to get struck in an infinite loop, so this is this bug in the flowchart for values of N less than equal to 0. Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07 Republic of the Philippines CAVITE STATE UNIVERSITY Don Severino delas Alas Campus Indang, Cavite COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY EXAMINATION FORM 47. Which of the following value will be printed if the value of N = 0? A. 0 B. 720 C. 5040 D. None of these Answer: Option D Explanation: For value of N equal to 0, the flowchart gets struck in an infinite loop. Hence answer to this question is option D (none of these) For Questions 48-50. Study the flow chart shown below to answer the following questions. Prepared By: Joven R. Ramos Signature Over Printed Name of Faculty Reviewed By: Ronald P. Peña Signature Over Printed Name of Chairperson Approved By: David L. Cero Signature Over Printed Name of Dean V01-2019-02-07
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved