DEVRY CIS 115 Final Exam 1 Check this A+ tutorial guideline at For more classes visit

Slides:



Advertisements
Similar presentations
Programming Logic and Design Eighth Edition
Advertisements

CS 111: Introduction to Programming Midterm Exam NAME _________________ UIN __________________ 10/30/08 1.Who is our hero? 2.Why is this person our hero?
Chapter 3 IFTHENELSE Control Structure © 2008 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. Marilyn Bohl/Maria Rynn Tools for Structured.
Objectives In this chapter, you will learn about:
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
Switch structure Switch structure selects one from several alternatives depending on the value of the controlling expression. The controlling expression.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 6 – Car Payment Calculator Application: Introducing.
Presented by Joaquin Vila Prepared by Sally Scott ACS 168 Problem Solving Using the Computer Week 12 Boolean Expressions, Switches, For-Loops Chapter 7.
Looping While-continue.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Wage Calculator Application: Introducing.
Programming Logic and Design Fifth Edition, Comprehensive
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
Programming Logic and Design Sixth Edition Chapter 5 Looping.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
PROBLEM SOLVING WITH LOOPS Chapter 7. Concept of Repetition Structure Logic It is a computer task, that is used for Repeating a series of instructions.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 4 Looping.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
Copyright © 2012 Pearson Education, Inc. Chapter 5: Loops.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Chapter Looping 5. The Increment and Decrement Operators 5.1.
Algorithms and Pseudocode
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Programming Logic and Design Fifth Edition, Comprehensive Chapter 6 Arrays.
Chapter 4 Repetition Statements Program Development and Design Using C++, Third Edition.
CIS 115 All Exercises Devry University (Devry) For more course tutorials visit CIS 115 All Exercises Devry University.
CIS 115 AID Peer Educator/cis115aid.com FOR MORE CLASSES VISIT
CIS 115 Slingshot Academy / Tutorialrank.com Tutorialrank.com For More Tutorials
CIS 115 All Exercises Devry University (Devry) FOR MORE CLASSES VISIT CIS 115 All Exercises Devry University.
CIS 115 All Exercises Devry University (Devry) FOR MORE CLASSES VISIT CIS 115 All Exercises Devry University.
CIS 115 ALL EXERCISES DEVRY UNIVERSITY (DEVRY)  CIS 115 All Exercises Devry University CIS 115 ALL ILABS DEVRY UNIVERSITY (DEVRY)  CIS 115 All iLabs.
CIS 115 AID Teaching Effectively/cis115aid.com FOR MORE CLASSES VISIT
PHP Condtions and Loops Prepared by Dr. Maher Abuhamdeh.
DEVRY CIS 115 F INAL E XAM 2 Check this A+ tutorial guideline at For more classes visit
DEVRY CIS 115 F INAL E XAM 3 Check this A+ tutorial guideline at For more classes visit
DEVRY CIS 115 Week 7 Lab Fireworks Stand Checkout Check this A+ tutorial guideline at
DEVRY CIS 170 C I L AB 2 OF 7 D ECISIONS Check this A+ tutorial guideline at decisions For.
DEVRY CIS 170 C I L AB 3 OF 7 L OOPING Check this A+ tutorial guideline at looping For more.
CIS 115 Slingshot Academy / cis115.com
Introduction to Computer Programming
ALGORITHMS AND FLOWCHARTS
Exercise : Write a program that print the final price of purchase at a store where everything costs exactly one dollar. Ask for the number of items purchased.
while Repetition Structure
Chapter 3 Assignment and Interactive Input.
Chapter 2 Assignment and Interactive Input
The Selection Structure
Chapter 5: Control Structure
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Chapter 5: Loops and Files.
Scripts & Functions Scripts and functions are contained in .m-files
CIS 115 Possible Is Everything/snaptutorial.com
CIS115 Education for Service-- snaptutorial.com
CIS 115Competitive Success/tutorialrank.com
CIS 115 Lessons in Excellence-- cis115.com. CIS 115 All Exercises Devry University (Devry) For more course tutorials visit CIS 115 All.
CIS 115 Education for Service-- tutorialrank.com.
CIS 115 Education for Service-- cis115.com. CIS 115 All Exercises Devry University (Devry) For more course tutorials visit CIS 115 All.
CIS 115 Teaching Effectively-- snaptutorial.com
Manipulating Pictures, Arrays, and Loops part 2
Pseudocode algorithms using sequence, selection and repetition
Iteration: Beyond the Basic PERFORM
Arrays, Part 1 of 2 Topics Definition of a Data Structure
Arrays, Part 1 of 2 Topics Definition of a Data Structure
EPSII 59:006 Spring 2004.
Programming Logic and Design Fifth Edition, Comprehensive
Topics Introduction to Repetition Structures
Arrays, Part 1 of 2 Topics Definition of a Data Structure
REPETITION Why Repetition?
Presentation transcript:

DEVRY CIS 115 Final Exam 1 Check this A+ tutorial guideline at For more classes visit 1. (TCO 1) What does IPO of IPO Model stand for? (Points : 4) 2. (TCO 1) What is a data item with a name and a value that remain the same during the execution of a program? (Points : 4) 3. (TCO 1) What symbol in a flowchart would be used by a developer to represent an input or output operation? (Points : 4) 4. (TCO 1) Set is a process. What data type would you expect the variable, name, to have? (Points : 4) 5. (TCO 1) You are using dollar amounts in an algorithm. What data type would you assign? (Points : 4) 6. (TCO 2) What tool is used by developers to design logic using specific shapes/symbols? (Points : 4) 7. (TCO 2) When a program evaluates mathematical expression, which of the following operators (or mathematical operations) has the lowest precedence? (Points : 4) 8. (TCO 2) Using the assignment statement, + sales, which side of the equal sign is evaluated first? (Points : 4) 9. (TCO 2) What value will be contained in the variable, x, after the following statement is executed? * 5 / (Points : 4) 10. (TCO 2) Review the partial pseudocode below. What is the correct math expression to complete the algorithm and total sales for both regions? Prompt “Enter total sales for region 1: ” Input region1 Prompt “Enter total sales for region 2: ” Input region2

S ET _____ D ISPLAY “ TOTAL SALES : ” + TOTAL (P OINTS : 4) 11. (TCO 3 & 4) R EVIEW THE PSEUDOCODE BELOW. W HAT WILL BE DISPLAYED WHEN THIS ALGORITHM EXECUTES ? S ET I F (( X > 10) AND ( X D ISPLAY “ THE IF PATH EXECUTES ” E LSE D ISPLAY “ THE ELSE PATH EXECUTES ” E ND I F (P OINTS : 4) 12. (TCO 3 & 4) W HAT VALUE GETS DISPLAYED FOR THE VARIABLE X? S ET S ET S ET I F (B > 15) AND (() OR (C S ET E LSE S ET E ND I F D ISPLAY X (P OINTS : 4)

D ISPLAY X (P OINTS : 4) 13. (TCO 3 & 4) I N THE FOLLOWING PSEUDOCODE, WHAT RAISE WILL AN EMPLOYEE IN D EPARTMENT 6 RECEIVE ? I F DEPARTMENT S ET E LSE I F DEPARTMENT S ET E LSE S ET E ND I F E ND I F (P OINTS : 4) 14. (TCO 3 & 4) W HICH OF THE SELECTION STRUCTURES DETERMINES IF THE USER ENTERS A NUMBER BETWEEN 20 AND 45? (P OINTS : 4) 15. (TCO 3 & 4) W HAT VALUE GETS DISPLAYED FOR THE VARIABLE Z? S ET S ET S ET I F (( BALANCE <> 800) OR ( STATE C ODE <> 6) OR ( CREDIT C ODE <> 7) THEN S ET E LSE S ET E ND I F D ISPLAY Z (P OINTS : 4) 1. (TCO 5) T HE VARIABLE USED TO CREATE AN EXPRESSION CONTROLLING THE LOOP IS KNOWN AS THE _____. (P OINTS : 4) 2. (TCO 5) W HICH OF THE FOLLOWING STATEMENTS IS FALSE ? (P OINTS : 4)

3. (TCO 5) W HICH CONTROL STRUCTURE IS CLASSIFIED AS A LOOP ? (P OINTS : 4) 4. (TCO 5) R EPETITION THAT LOOPS A CERTAIN NUMBER OF TIMES IS TYPICALLY REFERRED TO AS _____. (P OINTS : 4) 5. (TCO 5) H OW MANY TIMES WILL THE FOLLOWING LOOP BE EXECUTED ? S ET DOWHILE X <> 7 D ISPLAY X S ET + 1 ENDO (P OINTS : 4) 6. (TCO 7) W HAT IS A SUBSCRIPT OR AN INDEX ? (P OINTS : 4) 7. (TCO 7) S UPPOSE YOU HAVE AN ARRAY NAMED NUMBER AND TWO OF ITS ELEMENTS ARE NUMBER (1) AND NUMBER (4). Y OU KNOW THAT _____. (P OINTS : 4) 8. (TCO 7) W HAT IS THE VALUE OF THE INDEX USED TO ACCESS THE LAST ELEMENT IN A ZERO - BASED ARRAY DECLARED AS NUM (12)? (P OINTS : 4) 9. (TCO 7) W HEN LOADING / INITIALIZING THE ELEMENTS OF AN ARRAY, WHAT CONTROL STRUCTURE IS USED TO MOVE THROUGH EACH ELEMENT WITHIN THE ARRAY ? (P OINTS : 4) 10. (TCO 7) A ZERO - BASED ARRAY NAMED SALES HAS BEEN DECLARED AND LOADED WITH THE VALUES : 100, 1100, 3400, 5550, 3000, 22300, W HAT VALUE WILL BE STORED IN THE ARRAY ELEMENT, SALES (2)? (P OINTS : 4) 11. (TCO 6) A RECORD CONTAINS _____. (P OINTS : 4) 12. (TCO 6) W HAT ARE THE THREE MODES OF OPERATION ON A FILE ? (P OINTS : 4) 13. (TCO 8) M ANY ALGORITHMS REQUIRE DIRECT COMMUNICATION FROM USERS. T HESE TYPES OF ALGORITHMS ARE CALLED _____. (P OINTS : 4) 14. (TCO 9) W HAT TYPE OF ERROR OCCURS WHEN AN ARRAY SUBSCRIPT ’ S VALUE GOES BEYOND THE TOTAL NUMBER OF ELEMENTS IN THE ARRAY ? (P OINTS : 4) 15. (TCO 2) W HAT TYPE OF VARIABLE CAN BE ACCESSED BY ANY MODULE WITHIN THE DESIGN ? (P OINTS : 4)

1. (TCO 10) A department store is having a customer appreciation sale. Depending on the total dollars purchased, the customer could receive a discount on total purchases. You are to develop pseudocode that will obtain the total dollars purchased from the user, determine the discount percent, and display the total amount due. When the purchases are more than $500, the discount is 10%. When the purchases are $500 or less, the discount is 6%. (Points : 10) 2. (TCO 10) A small business in your neighborhood would like an application developed that determines the average dollar amount spent for every three purchases. The user will enter three different purchase amounts. You need to display the average to your client. Complete the pseudocode to design your logic. (Points : 10) 3. (TCO 9 & 10) There is a logic error in the following pseudocode. What statement(s) would you need to add to correct the logic? Be sure to explain why you are adding the statements. Set DOWHILE num Set + num ENDO Display total (Points : 10) 4. (TCO 4 & 10) Complete the pseudocode by rewriting the algorithm. The design is determining the correct sales tax depending on the county identifying code. Counties with a number less than 7 have a 5% sales tax. The 8-24 codes have a sales tax of 7%. Codes above 24 have a sales tax of 9%. The code is entered by the user. Begin Declare Real salesTax Declare ____ countyCode _____ “Enter the county code: “ Input _____________ If _______ Set Else If ______ AND ______ then ______________ Else Set EndIf

D ISPLAY “ THE SALES TAX IS : “ + _______________ E ND (P OINTS : 10) 5. (TCO 5 & 10) C OMPLETE THE PSEUDOCODE BY REWRITING THE ALGORITHM. T HE DESIGN IS TO DISPLAY A 60 SECOND COUNTDOWN. B EGIN D ECLARE _______ COUNT S ET REPEAT D ISPLAY “ COUNTDOWN : “ + _______ S ET - 1 UNTIL ___________ D ISPLAY “LIFT OFF!” E ND (P OINTS : 10) 6. (TCO 4, 5 & 10) C OMPLETE THE PSEUDOCODE BY REWRITING THE ALGORITHM. T HE COLORS RED, BLUE, AND YELLOW ARE KNOWN AS PRIMARY COLORS BECAUSE THEY CANNOT BE MADE BY MIXING OTHER COLORS. W HEN YOU MIX TWO PRIMARY COLORS, YOU GET A SECONDARY COLOR. M IXING YELLOW AND BLUE GETS YOU GREEN. M IXING RED AND BLUE GETS YOU PURPLE. T HE ALGORITHM ALLOWS THE USER TO ENTER TWO PRIMARY COLORS AND THEN DISPLAYS THE RESULTING SECONDARY COLOR. T HE COLORS ENTERED BY THE USER WILL BE VALIDATED TO ENSURE THEY ENTERED A PRIMARY COLOR. B EGIN D ECLARE S TRING COLOR 1 D ECLARE S TRING COLOR 2 D ECLARE S TRING CONTROL 1 D ECLARE S TRING CONTROL 2 ______ “E NTER FIRST PRIMARY COLOR : “ I NPUT _______ P ROMPT “E NTER THE SECOND PRIMARY COLOR : “ I NPUT _________

S ET CONTROL 1 = “ N ” DOWHILE CONTROL 1 = “ N ” I F ( COLOR 1 <> “ YELLOW ”) ______ ( COLOR 1 <> “ RED ”) _______ ( COLOR 1 <> “ BLUE ”) THEN P ROMPT “ FIRST PRIMARY COLOR IS INVALID ” I NPUT _________ E LSE S ET CONTROL 1 = “ Y ” ENDO S ET CONTROL 2 = “ N ” DOWHILE CONTROL 2 = “ N ” I F ( COLOR 2 <> “ YELLOW ”) ______ ( COLOR 2 <> “ RED ”) _______ ( COLOR 2 <> “ BLUE ”) THEN P ROMPT “ SECOND PRIMARY COLOR IS INVALID ” I NPUT COLOR 2 E LSE S ET CONTROL 2 = “ Y ” ENDO I F ( COLOR 1 = “ RED ”) AND (__________) THEN