This document contains sample exam questions and answers for CIS 115 at Devry University. It includes two practice final exams that cover topics like flowcharts, pseudocode, variables, selection structures, repetition structures and arrays. The exams are multiple choice and contain questions to test understanding of programming concepts and the ability to write basic algorithms and pseudocode. Additional information is provided to access more course materials and classes through an online tutorial website.
For more course tutorials visit
www.cis115.com
CIS 115 All Exercises Devry University
==============================================
CIS 115 All iLabs Devry University (Devry)
For more cour
For more course tutorials visit
www.cis115.com
CIS 115 All Exercises Devry University
==============================================
CIS 115 All iLabs Devry University (Devry)
For more cour
CIS 115 Education in iCounseling ---cis115.comclaric59
For more course tutorials visit
www.cis115.com
CIS 115 All Exercises Devry University
==============================================
CIS 115 All iLabs Devry University (Devry)
CIS 115 Education in iCounseling ---cis115.comclaric59
For more course tutorials visit
www.cis115.com
CIS 115 All Exercises Devry University
==============================================
CIS 115 All iLabs Devry University (Devry)
1. (TCO 1) Which of the following sets of SQL clauses represent the minimum combination of clauses to make a working SQL statement? (Points : 5)
SELECT, WHERE
FROM, WHERE
SELECT, FROM
FROM, ORDER BY
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docxrafbolet0
Spring 2014 CSCI 111 Final exam � of �1 6
1. (2 points) Flip over this test. On the back of this test write your name in the upper, left-hand
corner.
2. (2 points) What are the four parts of the compiling process (just give me 4 words, not a
paragraph).
3. (4 points) Which of the four steps of the compiling process occurs only once, regardless of
the number of source files your application has?
4. (4 points) Write a line of code that causes the preprocessor to generate an error.
5. (4 points) Write a line of code that causes the compiler to generate an error.
6. (5 points) Describe how you could incorrectly compile the joust project to cause the linker to
generate an error.
7. (5 points) Given:
1 float* fp;
2 //...
3 float pi;
4 pi=*(314 + fp);
Rewrite line 4 using array subscript notation.
Spring 2014 CSCI 111 Final exam � of �2 6
8. (5 points) Given:
1 float arr[100];
2 for(int x=0; x<100; ++x)
3 arr[x]=100-x;
What does the following expression print out?
cout << *arr << endl;
9. (14 points) Given:
int a=0;
int b=6;
int x=0;
Circle each if-expression that evaluates to true:
A) if(b)
B) if(x)
C) if(a=b==6)
D) if(a=b==5)
E) if(a=b=5)
F) if(a=x=0)
G) if(a=x==0)
Spring 2014 CSCI 111 Final exam � of �3 6
10. (10 points) Given:
1 #include<iostream>
2 using namespace std;
3
4 int main()
5 {
6 int x;
7 cout << "Enter a number greater than 10" << endl;
8 while ( x < 10 )
9 {
10 cin >> x;
11 }
12 return 0;
13 }
This program compiles just fine, and sometimes it runs as expected. But sometimes when you
run it, it exits immediately after printing "Enter a number greater than 10". That is, the program
doesn't pause for you to enter a number. Why are you getting this inconsistent behavior?
11. (4 points) What is the output of the following:
int x=4;
int y=3;
A) cout << x / y << endl;
B) cout << x % y << endl;
C) cout << x << "%" << y << endl;
D) cout << "x" << '%' << 'y' << endl;
Spring 2014 CSCI 111 Final exam � of �4 6
12. (16 points) What is the type of the expression. That is, what is the kind of thing that each
expression evaluates to. For example:
3 + 4 integer
You may assume that the variable a has been declared as an integer.
A. a + 4
B. a = 4
C. 3.14 + 4.49
D. 3 + 3.14
E. 'a'
F. cout << a
G. new float[30]
H. new float
Spring 2014 CSCI 111 Final exam � of �5 6
13. (5 points) Write a for-loop that prints out the numbers between 1 and 100 that are evenly
divisible by three.
14. (5 points) Write a while-loop that prints out the numbers between 1 and 100 that are evenly
divisible by three.
15. (5 points) Write a do-while-loop that prints out the numbers between 1 and 100 that are
evenly divisible by three.
Spring 2014 CSCI 111 Final exam � of �6 6
16. (10 points) Given:
1 #include<iostream>
2
3 class Willow {
4 publi.
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxmelbruce90096
Week 2 iLab
TCO 2 — Given a simple problem, design a solution algorithm that uses arithmetic expressions and built-in functions.
Scenario
Your goal is to solve the following simple programming exercise. You have been contracted by a local antique store to design an algorithm determining the total purchases and sales tax. According to the store owner, the user will need to see the subtotal, the sales tax amount, and the total purchase amount. A customer is purchasing four items from the antique store. Design an algorithm where the user will enter the price of each of the four items. The algorithm will determine the subtotal, the sales tax, and the total purchase amount. Assume the sales tax is 7%.
Be sure to think about the logic and design first (input-process-output (IPO) chart, flowchart, and pseudocode). Display all output using currency formatting.
Advanced (optional): Use a constant for the 7% sales tax.
Rubric
Point distribution for this activity:
iLab Activity
Document
Points possible
Points received
Variable list
10
IPO chart
10
Flowchart
10
Pseudocode/C# code
10
Desk-check
10
Total Points
50
Name:_________________
(1) Variable List With Data Type
List all the variables you will use (use valid variable names). Indicate whether the data type is string, integer, or double, and so on.
(2) IPO Model
List the inputs, any processes, calculations, and outputs. Use the same valid variable names you used in Step 1.
Inputs
Process (calculations)
Outputs
(3) Flowchart
Use MS Visio to create a flowchart. Paste the flowchart here, or attach as separate document. Use the same valid variable names you used in Step 1.
(4) Pseudocode or C# Code
Describe your solution using pseudocode or actual C# code. Use the same valid variable names you selected in Step 1.
(5) Desk-Check
Desk-check your solution by selecting appropriate test data.
Test data: List the values for your test data.
Expected output: What is the expected output of your program?
Step
Variables (write variable names in first line below)
Output
Enter step numbers
1
2
3
Week 2 Activity—Game Seating Charges
TCO 2—Given a simple problem, design a solution algorithm that uses arithmetic expressions and built-in functions.
Assignment
Your goal is to solve the following simple programming exercise. You have been contracted by a local stadium to design an algorithm determining the total seating charges for any game held at the stadium. Lower-level seats cost $25 per seat, mid-level seats cost $15 per seat, and upper-level seats cost $10 per seat. The algorithm should ask the user for the number of seats being purchased in each seating level. Then, the algorithm will determine the total for each level and a grand total for the enti.
This slide includes: Control Flow and Functions.
That is Boolean values and operators.
It include Iteration,Fruitful functions,Scope of Variable and Modules.
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
• Using Google, research the use of parallelism and concurrency in video gaming today. Describe how each
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows,
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
1. CIS 115 All Exercises Devry University
For more classes visit
www.snaptutorial.com
CIS 115 All Exercises Devry University
***************************************************
CIS 115 All iLabsDevry University
For more classes visit
www.snaptutorial.com
CIS 115 All iLabsDevry University
***************************************************
CIS 115 Entire Course
2. For more classes visit
www.snaptutorial.com
CIS 115 Entire Course: Devry University: All iLabs and Exercises
***************************************************
CIS 115 Final Exam 1
For more classes visit
www.snaptutorial.com
(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)
3. 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 / 10 + 6 (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
Set _____
Display “total sales: ” + total (Points : 4)
11. (TCO 3 & 4) Review the pseudocode below. What will be
displayed when this algorithm executes?
Set
If ((x > 10) AND (x < 20))="">
Display “the IF path executes”
Else
Display “the ELSE path executes”
EndIf (Points : 4)
12. (TCO 3 & 4) What value gets displayed for the variable X?
Set
Set
Set
If (B > 15) AND (() OR (C <= 15))="">
Set
Else
Set
EndIf
Display X (Points : 4)
13. (TCO 3 & 4) In the following pseudocode, what raise will an
employee in Department 6 receive?
If department < 2="">
Set
Else
4. If department < 6="">
Set
Else
Set
EndIf
EndIf (Points : 4)
14. (TCO 3 & 4) Which of the selection structures determines if the
user enters a number between 20 and 45? (Points : 4)
15. (TCO 3 & 4) What value gets displayed for the variable Z?
Set
Set
Set
If ((balance <> 800) OR (stateCode<> 6) OR (creditCode<> 7) then
Set
Else
Set
EndIf
Display Z (Points : 4)
1. (TCO 5) The variable used to create an expression controlling the
loop is known as the _____. (Points : 4)
2. (TCO 5) Which of the following statements is false? (Points : 4)
3. (TCO 5) Which control structure is classified as a loop? (Points : 4)
4. (TCO 5) Repetition that loops a certain number of times is typically
referred to as _____. (Points : 4)
5. (TCO 5) How many times will the following loop be executed?
Set
DOWHILE x <> 7
Display x
Set + 1
ENDO (Points : 4)
6. (TCO 7) What is a subscript or an index? (Points : 4)
7. (TCO 7) Suppose you have an array named number and two of its
elements are number(1) and number(4). You know that _____. (Points
: 4)
8. (TCO 7) What is the value of the index used to access the last
element in a zero-based array declared as num(12)? (Points : 4)
5. 9. (TCO 7) When loading/initializing the elements of an array, what
control structure is used to move through each element within the
array? (Points : 4)
10. (TCO 7) A zero-based array named sales has been declared and
loaded with the values: 100, 1100, 3400, 5550, 3000, 22300, 1200.
What value will be stored in the array element, sales(2)? (Points : 4)
11. (TCO 6) A record contains _____. (Points : 4)
12. (TCO 6) What are the three modes of operation on a file? (Points :
4)
13. (TCO 8) Many algorithms require direct communication from
users. These types of algorithms are called _____. (Points : 4)
14. (TCO 9) What type of error occurs when an array subscript’s
value goes beyond the total number of elements in the array? (Points :
4)
15. (TCO 2) What type of variable can be accessed by any module
within the design? (Points : 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)
6. 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 _______ <= 7="">
Set
Else
If ______ AND ______ then
______________
Else
Set
EndIf
____________
Display “the sales tax is: “ + _______________
End (Points : 10)
5. (TCO 5 & 10) Complete the pseudocode by rewriting the
algorithm. The design is to display a 60 second countdown.
Begin
Declare _______ count
Set
REPEAT
Display “countdown: “ + _______
Set - 1
UNTIL ___________
Display “LIFT OFF!”
End (Points : 10)
6. (TCO 4, 5 & 10) Complete the pseudocode by rewriting the
algorithm. The colors red, blue, and yellow are known as primary
colors because they cannot be made by mixing other colors. When
you mix two primary colors, you get a secondary color. Mixing
yellow and blue gets you green. Mixing red and blue gets you purple.
7. The algorithm allows the user to enter two primary colors and then
displays the resulting secondary color. The colors entered by the user
will be validated to ensure they entered a primary color.
Begin
Declare String color1
Declare String color2
Declare String control1
Declare String control2
______ “Enter first primary color: “
Input _______
Prompt “Enter the second primary color: “
Input _________
Set control1 = “n”
DOWHILE control1 = “n”
If (color1 <> “yellow”) ______ (color1 <> “red”) _______ (color1 <>
“blue”) then
Prompt “first primary color is invalid”
Input _________
Else
Set control1 = “y”
ENDO
Set control2 = “n”
DOWHILE control2 = “n”
If (color2 <> “yellow”) ______ (color2 <> “red”) _______ (color2 <>
“blue”) then
Prompt “second primary color is invalid”
Input color2
Else
Set control2 = “y”
ENDO
If (color1 = “red”) AND (__________)then
Display “secondary color is: purple”
EndIf
If (color1 = “yellow”) AND (_________)then
Display “secondary color is: green”
EndIf
End (Points : 10)
8. 7. (TCO 1, 2, 3, & 4) Describe the difference between a flowchart and
pseudocode and explain whether one is more important to develop
than the other. (Points : 10)
8. (TCO 1, 2, 3, 4, & 5) Compare and contrast sequence control
structures and selection control structures. (Points : 10)
***************************************************
CIS 115 Final Exam 2
For more classes visit
www.snaptutorial.com
1. What is the first step in software development?
2. What are named locations in a computer’s memory holding
information required by a program?
3. What symbol in a flowchart would be used by a developer to
represent the beginning or ending point?
4. ) Set name = “BSCIS” is a process. What data type would you
expect the variable, name, to have?
5. (You are using dollar amounts in an algorithm. What data type
would you assign?
6. What tool is used by developers to design logic using specific
shapes/symbols?
7. When a program evaluates mathematical expression, which of the
following operators (or mathematical operations) takes precedence?
8. (Which one of the following is a valid assignment statement in a
program?
9. (Evaluate (2 * 3) ^ 3.
9. 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
Set _____
Display “total sales: “ + total (Points : 4)
11. (TCO 3 & 4) Review the pseudocode below. What will be
displayed when this algorithm executes?
Set
If ((x > = 10) AND (x < 20))="">
Display “the IF path executes”
Else
Display “the ELSE path executes”
EndIf (Points : 4)
12. (TCO 3 & 4) What value gets displayed for the variable X?
Set
Set
Set
If (B > 15) AND (() OR (C <= 15))="">
Set
Else
Set
EndIf
Display X (Points : 4)
13. (TCO 3 & 4) In the following pseudocode, what raise will an
employee in Department 6 receive?
If department < 2="">
Set
Else
If department < 6="">
Set
Else
Set
EndIf
10. EndIf (Points : 4)
14. (TCO 3 & 4) Which of the selection structures determine whether
the user enters a number outside a range of 5 and 15? (Points : 4)
15. (TCO 3 & 4) What value gets displayed for the variable Z?
Set
Set
Set
If ((balance <> 800) OR (stateCode<> 6) OR (creditCode<> 7) then
Set
Else
Set
EndIf
Display Z (Points : 4)
1. (TCO 5) The statements executed within a loop are known
collectively as the _____. (Points : 4)
2. (TCO 5) Which of the following statements is false? (Points : 4)
3. (TCO 5) A DO loop is considered what type of loop? (Points : 4)
4. (TCO 5) What happens when the loop control variable is not
changed? (Points : 4)
5. (TCO 5) How many times will the following loop be executed?
Set
DOWHILE num<=>
Display num
Set + 1
ENDO (Points : 4)
6. (TCO 7) What is another name for an array’s index? (Points : 4)
7. (TCO 7) Suppose you have an array named number,
and two of its elements are number(1) and number(4). You know that
_____. (Points : 4)
8. (TCO 7) Which one of the following correctly declares a zero-
based array of four integers? (Points : 4)
9. (TCO 7) When processing the elements of an array, what control
structure is used to move through each element within the array?
(Points : 4)
10. (TCO 7) A zero-based array named sales has been declared and
loaded with the values 100, 1100, 3400, 5550, 3000, 22300, and 1200.
What value will be stored in the array element sales(1)? (Points : 4)
11. 11. (TCO 6) A file contains _____. (Points : 4)
12. (TCO 6) What is automatically placed at the bottom of a file when
the file is closed? (Points : 4)
13. (TCO 8) Menu-driven programs need to give the user the option
to _____. (Points : 4)
14. (TCO 9) What type of error occurs when a program will not
execute because the rules of the language have been violated? (Points
: 4)
15. (TCO 2) The first module is usually considered to be called the
_____ module. (Points : 4)
1. (TCO 10) A retail store is having a customer appreciation sale.
Depending on the total dollars purchased, the customer could receive
a discount on his or her total purchases. You are to develop
pseudocode that will obtain the total dollars purchased from the user,
determine the discount percentage, and display the total amount due.
When the purchases are more than $100, the discount is 10%. When
the purchases are $100 or less, the discount is 5%. (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.
The loop needs to execute four times. What statement(s) would you
need to add or change to correct the logic? Be sure to explain why
you are adding or changing the statements.
Set
REPEAT
Set + 1
UNTIL total <>
EndWhile
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 10
have a 6% sales tax. The 11–25 codes have a sales tax of 7%. Codes
above 25 have a sales tax of 8%. The code is entered by the user.
12. Begin
Declare Real salesTax
Declare _____ countyCode
_____ “Enter the county code: “
_____ countyCode
If _____ <= 10="">
Set
Else
If _____ AND _____ then
Set
Else
_____
EndIf
_____
Display “the sales tax is: “ + _____
End (Points : 10)
5. (TCO 5 & 10) Complete the pseudocode by rewriting the
algorithm. The design is to display a 60-second countdown.
Begin
Declare _____ count
Set
REPEAT
Display “countdown: “ + _____
Set - 1
UNTIL _____
EndDo
Display “LIFT OFF!”
End (Points : 10)
6. (TCO 4, 5 & 10) Complete the pseudocode by rewriting the
algorithm. The colors red, blue, and yellow are known as primary
colors because they cannot be made by mixing other colors. When
you mix two primary colors, you get a secondary color. Mixing
yellow and blue gets you green. Mixing red and blue gets you purple.
The algorithm allows the user to enter two primary colors and then
displays the resulting secondary color. The colors entered by the user
will be validated to ensure they entered a primary color.
Begin
13. Declare String color1
Declare String color2
Declare String control1
Declare String control2
_____ “Enter first primary color: “
Input _____
Prompt “Enter the second primary color: “
Input _____
Set control1 = “n”
DOWHILE control1 = “n”
If (color1 <> “yellow”) _____ (color1 <> “red”) _____ (color1 <>
“blue”) then
Prompt “first primary color is invalid”
Input _____
Else
Set control1 = “y”
ENDO
Set control2 = “n”
DOWHILE control2 = “n”
If (color2 <> “yellow”) _____ (color2 <> “red”) _____ (color2 <>
“blue”) then
Prompt “second primary color is invalid”
Input color2
Else
Set control2 = “y”
ENDO
If (color1 = “red”) AND (_____) then
Display “secondary color is: purple”
EndIf
If (color1 = “yellow”) AND (_____) then
Display “secondary color is: green”
EndIf
End (Points : 10)
7. (TCO 1, 2, 3, & 4) Describe the difference between a flowchart and
pseudocode and explain whether one is more important to develop
than the other. (Points : 10)
14. 8. (TCO 1, 2, 3, 4, & 5) Describe two of the three control structures
and how relational and logical operators are used. (Points : 10) on
control structures. (Points : 10)
***************************************************
CIS 115 Final Exam 3 Sets of Answers
For more classes visit
www.snaptutorial.com
CIS 115 Final Exam 3 Sets of Answers
***************************************************
CIS 115 Final Exam 3
For more classes visit
www.snaptutorial.com
. (TCO 1) When creating an IPO Model, program designers generally
determine _____ last. (Points : 4)
15. 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 the beginning or ending point? (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 designing an algorithm that will use a date of
01202009.What data type would you choose for this date variable?
(Points : 4)
6. (TCO 2) What is a tool that developers use to design logic using
English-like statements? (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) Which one of the following is not a valid assignment
statement in a program? (Points : 4)
9. (TCO 2) Evaluate (2 * 3) ^ 3. (Points : 4)
10. (TCO 2) Review the partial pseudocode below. What is the
correct math expression to complete the algorithm and determine 50%
of a cost?
Prompt “Enter total cost: “
Input cost
Set _____
Display “50% of the cost is: “ + total (Points : 4)
11. (TCO 3 & 4) Review the pseudocode below. What will be
displayed when this algorithm executes?
Set
If ((x > 10) AND (x < 20))="">
Display “the IF path executes”
Else
Display “the ELSE path executes”
EndIf (Points : 4)
12. (TCO 3 & 4) What value gets displayed for the variable X?
Set
Set
Set
If (B > 15) OR () OR (C <= 15)="">
16. Set
Else
Set
EndIf
Display X (Points : 4)
13. (TCO 3 & 4) In the following pseudocode, what percentage raise
will an employee in Department 5 receive?
If department < 3="">
Set
Else
If department < 5="">
Set
Else
Set
EndIf
EndIf (Points : 4)
14. (TCO 3 & 4) Which of the selection structures determines
whether the user enters a number between 20 and 45? (Points : 4)
15. (TCO 3 & 4) What value gets displayed for the variable Z?
Set
Set
Set
If ((balance <> 800) AND (stateCode<> 6) AND (creditCode<> 7)
then
Set
Else
Set
EndIf
Display Z (Points : 4)
1. (TCO 5) The variable used to create an expression controlling the
loop is known as the _____. (Points : 4)
2. (TCO 5) Which of the following statements is false? (Points : 4)
3. (TCO 5) Which loop may not execute the body of the loop at all?
(Points : 4)
4. (TCO 5) Repetition that loops a certain number of times is typically
referred to as _____. (Points : 4)
5. (TCO 5) How many times will the following loop be executed?
17. 6. (TCO 7) Subscripts or indexes of any array are always declared
with what data type? (Points : 4)
7. (TCO 7) What is an array element? (Points : 4)
8. (TCO 7) What is the value of the index used to access the last
element in a zero-based array declared as num(12)? (Points : 4)
9. (TCO 7) When processing/manipulating the elements of an array,
what control structure is used to move through each element within
the array? (Points : 4)
10. (TCO 7) A zero-based array named sales has been declared and
loaded with the values 100, 1100, 3400, 5550, 3000, 22300, and 1200.
What value will be stored in the array element sales(1)? (Points : 4)
11. (TCO 6) A record contains _____. (Points : 4)
12. (TCO 6) What are the three modes of operation on a file? (Points :
4)
13. (TCO 8) Algorithms that allow users to direct the flow of control
are often referred to as _____. (Points : 4)
14. (TCO 9) What type of error occurs when an array subscript’s
value goes beyond the total number of elements in the array? (Points :
4)
15. (TCO 2) Which of the following is not an advantage of modular
design? (Points : 4)
1. (TCO 10) A retail store is having a customer appreciation sale.
Depending on the total dollars purchased, the customer could receive
a discount on his or her total purchases. You are to develop
pseudocode that will obtain the total dollars purchased from the user,
determine the discount percentage, and display the total amount due.
When the purchases are more than $100, the discount is 10%. When
the purchases are $100 or less, the discount is 5%. (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
18. 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: “
_____ countyCode
If _____ <= 7="">
Set
Else
If _____ AND _____ then
Set
Else
_____
EndIf
_____
Display “the sales tax is: “ + _____
End (Points : 10)
5. (TCO 5 & 10) Complete the pseudocode by rewriting the
algorithm. The design is to display a 60-second counter. The counter
needs to begin at 1.
Begin
Declare _____ count
Set
REPEAT
Display “counter: “ + _____
Set count = _____ + 1
UNTIL count _____
Display “Done!”
End (Points : 10)
19. 6. (TCO 4 & 10) Complete the pseudocode by rewriting the
algorithm. The colors red, blue, and yellow are known as primary
colors because they cannot be made by mixing other colors. When
you mix two primary colors, you get a secondary color. Mixing
yellow and blue gets you green. Mixing red and blue gets you purple.
The algorithm allows the user to enter two primary colors and then
displays the resulting secondary color.
Begin
Declare _____ color1
Declare _____ color2
_____ “Enter first primary color: “ : 10)
***************************************************
CIS 115 Week 1 Exercise
For more classes visit
www.snaptutorial.com
Assignment:
This activity will assist you in the understanding of how output should
appear after statements are executed (results) and how to write proper
pseudocode.
1. Show the result of each pseudocode program.
2. Also rewrite the pseudocode statements using Assignment
statements.
Rubric:
When completed compile the following documents together neatly in
1 & 2 order:
1) This instruction sheet first
20. 2) Your answer sheet, second
Point distribution for this activity:
Pseudocode Activity
Document:
Points possible:
Points received
Problem #1
6
Problem #2
6
Problem #3
8
Total Points
20
Problem #1:
The variable X starts with the value 0.
The variable Y starts with the value 5.
Add 1 to X.
Add 1 to Y.
Add X and Y, and store the result in Y.
Display the value in Y on the screen.
Output #1:
Pseudocode #1:
Problem #2:
The variable J starts with the value 10.
The variable K starts with the value 2.
The variable L starts with the value 4.
Store the value of J times K in J.
Store the value of K times L in L.
Add J and L, and store the result in K.
Display the value in K on the screen.
Output #2:
Pseudocode #2:
Problem #3:
The variable A starts with the value 1.
The variable B starts with the value 10.
The variable C starts with the value 100.
21. The variable X starts with the value 0.
Store the value of C times 3 in X.
Add the value of B times 6 to the value already in X.
Add the value of A times 5 to the value already in X.
Display the value in X on the screen.
Output #3:
Pseudocode #3:
***************************************************
CIS 115 Week 1 iLab 1
For more classes visit
www.snaptutorial.com
A. Lab #: CIS CIS 115-A1
B. Lab 1 of 1 :
Fireworks Stand Checkout
C. Lab Overview – Scenario / Summary:
TCO #4
–
Given a simple business problem that requires one or more decisions,
create a solution algorithm that uses decisions with logical and
relational expressions.
TCO #5
–
Given a simple business program that requires iteration, create a
solution algorithm that employs loops.
TCO #9
–
22. Given a program with logic errors that is intended as a solution to a
simple business problem, employ debugging diagnostics to remove
and correct the errors.
Scenario:
Your algorithm will keep track of a customer’s purchases at the local
fireworks stand. Customers will not know exactly how many items
they will purchase, so using a FOR loop on this lab is not allowed.
Let’s keep the rules simple.
1) Accept the dollar value of each item purchased from the user until
the user is finished.
2) When purchases are complete, enter a sentinel value of -1
(indicating the user has finished).
3) If more the item purchased is 50.00 or more, give your customer a
10% discount on their item purchased.
4) Display all of the purchases to the customer with the original price
and the discount price.
Be sure to THINK about the logic and design first (IPO chart and
pseudocode), then code the Visual Logic command line processing.
D. Deliverables:
Deliverable
Points
Fireworks IPO Model
10
Fireworks Pseudocode
20
Fireworks Flowchart
20
***************************************************
CIS 115 Week 2 Exercise
For more classes visit
23. www.snaptutorial.com
Given a simple business problem, design a solution algorithm that
uses arithmetic expressions and built-in functions.
Assignment:
Your goal is to solve the following simple programming exercise.
You have been contracted by a local restaurant to design an algorithm
determining the total meal charges. The algorithm should ask the user
for the total food purchase and the tip percent. Then, the algorithm
will calculate the amount of a tip, a 7% sales tax, and the total meal
charge (including tip). The food purchase, sales tax, tip amount, and
total meal charge will need to be displayed to the customer.
Be sure to THINK about the logic and design first (IPO chart and
pseudocode), then code the Visual Logic command line processing.
Display all output using currency formatting (built-in Visual Logic
function).
Advanced (optional): use a constants for the 7% sales tax.
Rubric:
When completed staple the following documents together neatly in
1,2,3,4 order:
1) This instruction sheet first
2) The IPO Chart, second
3) The Pseudocode, third
4) The Flowchart and output example last.
***************************************************
CIS 115 Week 3 Exercise
For more classes visit
24. www.snaptutorial.com
Week 3 Activity – Calculate Overtime Pay TCO #4 – Given a simple
business problem that requires one or more decisions, create a
solution algorithm that uses decisions with logical and relational
expressions. TCO #9 – Given a program with logic errors that is
intended as a solution to a simple business problem, employ
debugging diagnostics to remove and correct the errors. Assignment:
You will need to design an application that it will prompt a user for
their hourly pay rate, their hours worked, and whether they are single,
married, divorced, or widowed. It will then calculate their gross and
net pay. If they work more than 40 hours, overtime is calculated at 1
½ times the regular rate and displayed separately. If they are married,
use a flat tax rate of 15%. If they are single, use 22%, if they are
divorced, use 23%, and if they are widowed, use 13% (I realize that
these are not very realistic). Here is a sample of what the program
should do when run: (No overtime example) Enter hourly pay rate:
10.00 Enter hours worked: 35 Enter letter for (M)arried, (S)ingle,
(D)ivorced, (W)idowed: M Gross pay is $350.00 Net pay is $297.50
(Overtime example) Enter hourly pay rate: 10.00 Enter hours worked:
45 Enter letter for (M)arried, (S)ingle, (D)ivorced, (W)idowed: S
Regular pay is $400.00 Overtime pay is $75.00 Gross pay is $475.00
Net pay is $370.50 Rubric: When completed staple the following
documents together neatly in 1,2,3,4 order: 1) This instruction sheet
first 2) The IPO Chart, second 3) The Pseudocode, third 4) The
Flowchart and output example last. Point distribution for this
application: Calculate Overtime Pay Document: Points possible:
Points received IPO Chart 5 Pseudocode 5 Flowchart and output 10
Total Points 20 IPO Chart: Input Processing Output Pseudocode:
25. Begin calculateOvertimePay End Flowchart: Example Output after
execution:
***************************************************
CIS 115 Week 3 Exercise
For more classes visit
www.snaptutorial.com
Week 3 Activity – Calculate Overtime Pay TCO #4 – Given a simple
business problem that requires one or more decisions, create a
solution algorithm that uses decisions with logical and relational
expressions. TCO #9 – Given a program with logic errors that is
intended as a solution to a simple business problem, employ
debugging diagnostics to remove and correct the errors. Assignment:
You will need to design an application that it will prompt a user for
their hourly pay rate, their hours worked, and whether they are single,
married, divorced, or widowed. It will then calculate their gross and
net pay. If they work more than 40 hours, overtime is calculated at 1
½ times the regular rate and displayed separately. If they are married,
use a flat tax rate of 15%. If they are single, use 22%, if they are
divorced, use 23%, and if they are widowed, use 13% (I realize that
these are not very realistic). Here is a sample of what the program
should do when run: (No overtime example) Enter hourly pay rate:
10.00 Enter hours worked: 35 Enter letter for (M)arried, (S)ingle,
26. (D)ivorced, (W)idowed: M Gross pay is $350.00 Net pay is $297.50
(Overtime example) Enter hourly pay rate: 10.00 Enter hours worked:
45 Enter letter for (M)arried, (S)ingle, (D)ivorced, (W)idowed: S
Regular pay is $400.00 Overtime pay is $75.00 Gross pay is $475.00
Net pay is $370.50 Rubric: When completed staple the following
documents together neatly in 1,2,3,4 order: 1) This instruction sheet
first 2) The IPO Chart, second 3) The Pseudocode, third 4) The
Flowchart and output example last. Point distribution for this
application: Calculate Overtime Pay Document: Points possible:
Points received IPO Chart 5 Pseudocode 5 Flowchart and output 10
Total Points 20 IPO Chart: Input Processing Output Pseudocode:
Begin calculateOvertimePay End Flowchart: Example Output after
execution:
***************************************************
CIS 115 Week 3 Lab Decision Calendar
For more classes visit
www.snaptutorial.com
i L A B O V E R V I E WScenario/Summary
Your goal is to solve the following programming lab activity. Write a
program that prompts and accepts a number between 1 and 12. After
getting the input, display the number with the appropriate month.
(example: This is the 1st month…January, This is the 2nd
month…February, This is the 12th month…December).
27. Be sure to THINK about the logic and design first (IPO chart and/or
pseudocode), then code the Visual Logic command line processing.
Deliverables Decision Calendar IPO Model Decision Calendar
Pseudocode Decision Calendar Flowchart Decision Calendar Output
Sample
***************************************************
CIS 115 Week 4 Exercise
For more classes visit
www.snaptutorial.com
TCO #4 – Given a simple business problem that requires one or more
decisions, create a solution algorithm that uses decisions with logical
and relational expressions.
TCO #9 – Given a program with logic errors that is intended as a
solution to a simple business problem, employ debugging diagnostics
to remove and correct the errors.
Assignment: You will need to design an application that will receive
the weight of a parcel and calculate and display the cost per kg and
the delivery charge for that parcel. Calculate the charges using the
following data:
Parcel Weight (kg) Cost per kg ($)
< 2.5="" kg="" $3.50="" per="" kg="">
2.5 to 5 kg $2.85 per kg
> 5kg $2.45 per kg
28. Make sure that the weight entered is a positive number, otherwise
your program should display an error message and end. Test your
algorithm with the following THREE sets of data:
Test case 1: package weight of 2 kg
Test case 2: package weight of 5 kg
Test case 3: package weight of 6 kg
Rubric:
When completed staple the following documents together neatly in
1,2,3,4 order:
1) This instruction sheet first
2) The IPO Chart, second
3) The Pseudocode, third
4) The Flowchart and output example last.
Point distribution for this application:
Parcel Charges
Document:
Points possible:
Points received
IPO Chart
5
Pseudocode
5
Flowchart and output
10
Total Points
20
IPO Chart:
Input
Processing
Output
Pseudocode:
Begin parcelCharges
End
Flowchart:
Example Output after execution:
***************************************************
29. CIS 115 Week 4 Lab Grade Calendar
For more classes visit
www.snaptutorial.com
You have been asked to design a program that will allow a teacher to
calculate the percentage and the final grade for students in a class.
The program will prompt the teacher to enter the student’s first and
last name and the number of points the student received. The program
shall only accept scores between 0 and 1,000 points (including 0 and
1,000), with 1,000 points being the maximum number of points. If the
input value is within the valid range, the program will display a "good
score" message; otherwise, the program will display an error message
and then terminate the program. The program shall then calculate the
score percentage, and then determine the grade based on the
percentage using the following grade criteria:
Score Percent Range
Grade
90-100
A
80-89
B
70-79
C
60-69
D
0-59
F
30. The program will then display the student’s first name, last name,
number of points, calculated percentage, and the final grade.
The program shall have an initial prompt informing the user of the
program's purpose, and a program termination message.
Be sure to THINK about the logic and design first (IPO chart and
pseudocode), then code the Visual Logic command line processing.
***************************************************
CIS 115 Week 5 Exercise
For more classes visit
www.snaptutorial.com
Assignment (part A): Your goal is to solve the following simple
programming exercise. Using a FOR loop, write an algorithm that
displays the squares of the numbers 1 to 10 to console output.
Thought provoking question: Do you need to accept input?
Assignment (part B): Using a pretest WHILE loop, write an algorithm
that displays the squares of the numbers 1 to 10 to console output.
Assignment (part C): This is extra for those who desire a challenge.
Accomplish the same output as above, but use a posttest WHILE loop
this time.
Be sure to THINK about the logic and design first (IPO chart and or
pseudocode), then code the Visual Logic command line processing.
Rubric:
When completed staple the following documents together neatly in
1,2,3,4 order:
1) This instruction sheet first
31. 2) The IPO Chart, second
3) The Pseudocode, third
4) The Flowchart and output example last.
***************************************************
CIS 115 Week 5 Lab Fireworks Stand Checkout
For more classes visit
www.snaptutorial.com
Your algorithm will keep track of a customer’s purchases at the local
fireworks stand. Customers will not know exactly how many items
they will purchase, so using a for-loop on this lab is not allowed. Let’s
keep the rules simple.
Accept the dollar value of each item purchased from the user until the
user is finished. When purchases are complete, enter a sentinel value
of -1 (indicating the user has finished). If the item purchased is $50.00
or more, give your customer a 10% discount on the item purchased.
Display all of the purchases to the customer with the original price
and the discount price.
Be sure to THINK about the logic and design first (IPO chart and
pseudocode), then code the Visual Logic command line processing.
Deliverables Firework Stand Checkout IPO Model Firework Stand
Checkout Pseudocode Firework Stand Checkout Flowchart Firework
Stand Checkout Output Sample
***************************************************
32. CIS 115 Week 6 Exercise
For more classes visit
www.snaptutorial.com
Assignment: Arrays are incredible fun! Today we are going to work
on a program to keep track of our homework scores for a math class.
Write a program that accepts five homework scores as input values
and stores them into a table (which is another name for an array).
Once the scores are in the array, we can process them again and again.
First, load the scores in your array. Second, display the contents of the
array in order. Third, display array in reverse order. Fourth, calculate
the average of the five scores entered in the array. Finally, the
algorithm should display all the homework scores in the array that are
larger than the previously calculated average. Make sure you use
some output statements to clarify all the details you are displaying,
being cautious about spelling and communicating to your user.
Be sure to THINK about the logic and design first (IPO chart and or
pseudocode), then code the Visual Logic command line processing.
Rubric:
When completed staple the following documents together neatly in
1,2,3,4 order:
1) This instruction sheet first
2) The IPO Chart, second
3) The Pseudocode, third
4) The Flowchart and output example last.
***************************************************
33. CIS 115 Week 6 Lab Fireworks Stand Checkout
For more classes visit
www.snaptutorial.com
Your algorithm will keep track of a customer’s purchases at the local
fireworks stand. Customers will not know exactly how many items
they will purchase, so using a for-loop on this lab is not allowed. Let’s
keep the rules simple.
Accept the dollar value of each item purchased from the user until the
user is finished. When purchases are complete, enter a sentinel value
of -1 (Make certain you do not include the -1 sentinel value in your
total). Keep track of the total dollar amount of all fireworks
purchased. Keep a tally of the number of items purchased. If more
than 20 items were purchased, give your customer a 10% discount on
the total purchases. Once purchases are complete, display the total
number of items purchased, the average price of the items, the total of
all fireworks purchased, any discount if applicable, and the total of all
fireworks purchased minus the discount.
Be sure to THINK about the logic and design first (IPO chart and/or
pseudocode), then code the Visual Logic command line processing.
Deliverables Firework Stand Checkout IPO Model Firework Stand
Checkout Pseudocode Firework Stand Checkout Flowchart Firework
Stand Checkout Output Sample
***************************************************
34. CIS 115 Week 7 Exercise
For more classes visit
www.snaptutorial.com
Assignment: Your goal is to solve the following simple programming
exercise. You have been asked by your accounting department to
design an algorithm determining the annual profit for your company.
The algorithm should ask the user for the projected monthly sales for
12 months. Then, you need to determine the annual profit and display
it to the user. The annual profit is 21% of the total sales.
Part A: Using Visual Logic, write the monthly sales amounts to a file,
monthly_Sales.dat. (Hint: be sure to enter a sentinel value for end of
file processing later.)
Part B: Using a separate algorithm, use the monthly_Sales.dat file as
input to determine the company’s annual profit.
Be sure to THINK about the logic and design first (IPO chart and or
pseudocode), then code the Visual Logic command line processing.
Rubric:
When completed staple the following documents together neatly in
1,2,3,4 order:
1) This instruction sheet first
2) The IPO Chart, second
3) The Pseudocode, third
4) The Flowchart and output example last.
***************************************************
35. CIS 115 Week 7 Lab Fireworks Stand Checkout
For more classes visit
www.snaptutorial.com
In this lab, you are going to extend the Fireworks Checkout Stand
application in Week 6. This week, we will be more efficient by using
files and modularizing the program. This week, we will also load our
array of valid zip codes from a text file. In addition, we will modify
the existing code to create a modularized design.
Load the array via a .txt file. Prompt to see if the user wants to search
for a zip code. Prompt the user to enter a zip code and search against
the array. If the zip code is found in the array, continue processing the
sale. If the zip code is not found in the array, display a message
stating, "State law prohibits selling fireworks for people living in the
zip code". Modularize your code.
Be sure to THINK about the logic and design first (IPO chart and/or
pseudocode), then code the Visual Logic command line processing.
***************************************************