100% found this document useful (1 vote)
19 views

Prelude to Programming 6th Edition Venit Test Bank instant download

The document provides links to various test banks and solutions manuals for programming and other academic subjects. It includes specific test questions and answers from the 'Prelude to Programming 6th Edition' by Elizabeth Drake. Additionally, it features true/false and short answer questions related to programming concepts.

Uploaded by

daadaakiaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
19 views

Prelude to Programming 6th Edition Venit Test Bank instant download

The document provides links to various test banks and solutions manuals for programming and other academic subjects. It includes specific test questions and answers from the 'Prelude to Programming 6th Edition' by Elizabeth Drake. Additionally, it features true/false and short answer questions related to programming concepts.

Uploaded by

daadaakiaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Prelude to Programming 6th Edition Venit Test

Bank pdf download

https://testbankdeal.com/product/prelude-to-programming-6th-
edition-venit-test-bank/

Download more testbank from https://testbankdeal.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Prelude to Programming 6th Edition Venit Solutions Manual

https://testbankdeal.com/product/prelude-to-programming-6th-edition-
venit-solutions-manual/

testbankdeal.com

C++ Programming From Problem Analysis to Program Design


6th Edition Malik Test Bank

https://testbankdeal.com/product/c-programming-from-problem-analysis-
to-program-design-6th-edition-malik-test-bank/

testbankdeal.com

C++ Programming From Problem Analysis to Program Design


6th Edition Malik Solutions Manual

https://testbankdeal.com/product/c-programming-from-problem-analysis-
to-program-design-6th-edition-malik-solutions-manual/

testbankdeal.com

Corporate Governance 3rd Edition Kim Test Bank

https://testbankdeal.com/product/corporate-governance-3rd-edition-kim-
test-bank/

testbankdeal.com
MR 2 2nd Edition Brown Test Bank

https://testbankdeal.com/product/mr-2-2nd-edition-brown-test-bank/

testbankdeal.com

Accounting Information Systems 9th Edition Hall Test Bank

https://testbankdeal.com/product/accounting-information-systems-9th-
edition-hall-test-bank/

testbankdeal.com

Business and Professional Ethics for Directors Executives


Accountants 8th Edition Brooks Test Bank

https://testbankdeal.com/product/business-and-professional-ethics-for-
directors-executives-accountants-8th-edition-brooks-test-bank/

testbankdeal.com

Cases in Finance 3rd Edition DeMello Solutions Manual

https://testbankdeal.com/product/cases-in-finance-3rd-edition-demello-
solutions-manual/

testbankdeal.com

Counseling Assessment and Evaluation 1st Edition Watson


Test Bank

https://testbankdeal.com/product/counseling-assessment-and-
evaluation-1st-edition-watson-test-bank/

testbankdeal.com
Intimate Relationships 7th Edition Miller Solutions Manual

https://testbankdeal.com/product/intimate-relationships-7th-edition-
miller-solutions-manual/

testbankdeal.com
Prelude to Programming 6th edition Elizabeth Drake

Test Bank for Prelude to Programming Chapter 6

MULTIPLE CHOICE

1. If Number = 4, what possible numbers can result from:


Floor(Random()() * 10) + Number

a. 1, 2, 3, 4
b. 0, 1, 2, 3, 4
c. 0, 1, 2, 3
d. 4, 5, 6, 7, 8, 9, 10, 11, 12, 13

ANS: D

2. If Number = 4, what possible numbers can result from


Floor(Random() * Number)

a. 1, 2, 3, 4
b. 0, 1, 2, 3, 4
c. 0, 1, 2, 3
d. 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
ANS: C

3. What is the output of the code corresponding to the following pseudocode?


Declare X As Integer
Declare Y As Integer
For (X = 1; X <=2; X++)
For (Y = 3; Y <= 4; Y++)
Write X * Y
End For(Y)
End For(X)

a. 3 b. 4 c. 1 d. 3 4
4 5 3 6 8
6 5 2
8 6 4

ANS: A

© 2015 Pearson Education 1


Prelude to Programming 6th edition Elizabeth Drake

4. What is the output of the code corresponding to the following pseudocode?


Declare Y As Integer
Declare X As Integer
For (Y = 1; Y <=2; Y++)
For (X = 3; X <= 4; X++)
Write Y * X
End For(X)
End For(Y)

a. 3 b. 4 c. 1 d. 3 4
4 5 3 6 8
6 5 2
8 6 4

ANS: A

5. What is the output of code corresponding to the following pseudocode?


Declare A As Integer
Declare B As Float
Set A = 2
While <= 3
Set B = 2.5 * A
Write B
Set B = Int(B)
Write B
Set A = A + 1
End While

a. 5 b. 5 c. 5 d. 2
7 5 5 5
7.5 7 3
7 7 7
ANS: B

6. Which of the following loops cannot be nested in a For loop?

a. While
b. For
c. Repeat ... Until
d. Do ... While
e. all of the above can be nested in a For loop

ANS: E

© 2015 Pearson Education 2


Prelude to Programming 6th edition Elizabeth Drake

7. What is the output of the code corresponding to the pseudocode shown?


Declare G As Integer
Declare H As Integer
Set G = 7
While G <= 8
Set H = 6
While H <= 7
Write G + H
Set H = H + 1
End While(H)
Set G = G + 1
End While(G)

a. 13 b. 7 c. 7 6 d. 13
14 6 7 7 14
15 7 8 6 14
8 8 7 15
ANS: D

8. What will be displayed after code corresponding to the following pseudocode is run?
Declare A As Integer
Declare B As Integer
Declare C As Integer
Set A = 3
While A <= 6
Set B = (2 * A) – 1
Write B
Set C = A
While C <= (A+1)
Write C
Set C = C + 1
End While(C)
Set A = A + 2
End While(A)

a. 5 b. 3 c. 5 d. 5
3 5 3 3
9 4 4 3
5 5 9 9
9 5 5
5 6 5
ANS: C

© 2015 Pearson Education 3


Prelude to Programming 6th edition Elizabeth Drake

9. Which of the following statements should be used to validate that a number input by the
user into a variable named Widgets is an integer value?

a. While Widgets != Widgets


Write “Please enter an integer value:”
Input Widgets
End While
b. While Int(Widgets) != Widgets
Write “Please enter an integer value:”
Input Widgets
End While
c. Repeat
Write “Please enter an integer value:”
Input Widgets
End Repeat
d. While Widgets > 0
Write “Please enter an integer value:”
Input Widgets
End While
ANS: B

10. What does the following program segment do?


Declare Count As Integer
Declare Sum As Integer
Set Sum = 0
For (Count = 1; Count < 50; Count++)
Set Sum = Sum + Count
End For

a. It sums all the integers from 0 through 50


b. It sums all the integers from 1 through 50
c. It sums all the integers from 1 through 49
d. It does nothing since there is no Write statement
ANS: C

© 2015 Pearson Education 4


Prelude to Programming 6th edition Elizabeth Drake

11. What is wrong with the following pseudocode?


Declare Count As Integer
Declare TheNumber As Integer
Set TheNumber = 12
For (Count = 10; Count>TheNumber; Count--)
Write TheNumber + Count
End For

a. A counter must start at 0 or 1


b. The limit condition in a For loop cannot be a variable
c. The loop will never be entered since the initial value of Count is less than the
test condition
d. The loop will never end since the test condition will never be met
ANS: D

12. If MyNumber = 7.82, what is the value of Int(MyNumber/2)+ 0.5?

a. 4.41
b. 3.5
c. 3.91
d. 4.5

ANS: B

13. What is the output of the code corresponding to the following pseudocode?
Declare M As Integer
Declare P As Integer
Repeat
Set P = 1
While P < 4
Write M + “ and “ + P
Set P = P + 1
End While(P)
Set M = M + 1
Until M = 3

a. 2 and 1 b. 2 and 1 c. 1 and 1 d. M and P


3 and 1 2 and 2 2 and 2 M and P
2 and 3 3 and 3 M and P
3 and 1
3 and 2
3 and 3
ANS: B

© 2015 Pearson Education 5


Prelude to Programming 6th edition Elizabeth Drake

14. Which statement would produce an output of one of the following numbers:
5, 6, 7, 8, 9, 10

a. Floor(Random() * 5) + 5
b. Floor(Random() * 6) + 5
c. Floor(Random()) + 5
d. Floor(Random() * 9) - 5

ANS: A

15. What is displayed when the following pseudocode is coded and run, given that the input is
“Harold”?

Declare Star As Character


Declare A As Integer
Declare Count As Integer
Declare Name As String
Set Star = “*”
Write “Enter your first name: “
Input Name
Set A = Length_Of(Name)
Set Count = 1
Print Name
Print <NL>
While Count <= A
Print Star
Set Count = Count + 1
End While

a. Harold b. Harold c. ****** d. Harold


* ***** ******
ANS: D

TRUE/FALSE
1. True/False: It is possible to have both a Select Case statement and an If-Then
structure within a single loop.
ANS: T

2. True/False: If Number = 4, is the following statement true or false:


Int(Number * Number) == Number * Number
ANS: T

3. True/False: If Number = 2.7, is the following statement true or false:


Int(Number * Number) == Number * Number
ANS: F
© 2015 Pearson Education 6
Prelude to Programming 6th edition Elizabeth Drake

4. True/False: If one For loop is nested within another, then the limit value for the two loops
must be different.
ANS: F

5. True/False: Two non-overlapping loops can be nested within a third loop.


ANS: T

6. True/False: If Number = 3, indicate whether the following statement is true


or false:
Floor(Random() * Number) may be 0, 1, 2, or 3
ANS: F

7. True/False: A For loop may not be nested within a While loop.


ANS: F

8. True/False: Given that Number = 3:


Floor(Random() * Number) + 4 may be 7, 8, 9, 10, 11, 12, or 13
ANS: F

9. True/False: Given that Number = 3:


Floor(Random() * 4) + Number may be 3, 4, 5, or 6
ANS: T

10. True/False: It is not possible to put a loop inside an If-Then statement.


ANS: F

11. True/False: If Number = 2.3, is the following statement true or false:


Number == Int(Number)
ANS: F

12. True/False: A counter in a loop can count up by fives.


ANS: T

13. True/False: Is the following statement true or false?


Ceiling(6.89) = 6
ANS: F

14. True/False: In a program with nested loops, the inner loop is completed before the outer
loop.
ANS: T

15. True/False: Is the following statement true or false?


Ceiling(4.22) = 5
ANS: T

© 2015 Pearson Education 7


Prelude to Programming 6th edition Elizabeth Drake

SHORT ANSWER

1. Numbers that form an unpredictable sequence in which each number is equally likely to oc-
cur are called __________ __________.
ANS: random numbers

2. ____________ __________ are numbers that belong to a sequence, generated by a


mathematical algorithm, in which each number is equally likely to occur.
ANS: pseudorandom numbers

3. The starting value of an algorithm used to generate a range of numbers is called the
_________.
ANS: seed

4. The expression Floor(Random()*6) produces the numbers _____ through _____


ANS: 0, 5

5. When one loop is contained within another loop, we say these are __________ loops.
ANS: nested

6. The statement
If Int(Number) != Number Then...
checks to see if the value of Number is a(n) _________.
ANS: integer

7. In a program with nested loops, the outer loop is completed __________ (before/after) the
inner loop.
ANS: after

8. If a counter named MyCount in a For loop has the value of 5 on the first pass, 10 on the
second pass, 15 on the third pass, and so on, the increment would be written as
__________.
ANS: MyCount+5

9. If a counter named MyCount in a For loop has the initial value of 5 on the first pass and
we want it to go through 4 iterations, increasing its value by 5 on each pass, the test
condition would be written as __________.
ANS: MyCount <= 20 or MyCount < 21

10. The function that returns the number of characters in a string is the __________ function.
ANS: Length_Of()

© 2015 Pearson Education 8


Another Random Scribd Document
with Unrelated Content
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like