Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 22 pages
Exam (elaborations)

COMPUTER SCIENCE EXAM QUESTIONS AND ANSWERS COMPLETE AND VERIFIED RATED A

Document preview thumbnail
Preview 3 out of 22 pages

COMPUTER SCIENCE EXAM QUESTIONS AND ANSWERS COMPLETE AND VERIFIED RATED A

Content preview

COMPUTER SCIENCE EXAM QUESTIONS
AND ANSWERS COMPLETE AND VERIFIED
RATED A.
What is one advantage of using external data files
a. repeating commands in programs
b. inputting large amounts of data from a file instead of the keyboard
c. inputting data from the internet instead of a keyboard
d. repeating data input from multiple sources
b
______________ holds running programs and the information they are using
main memory
which command sends information to a data file
write()
why do we use the close command when outputting to a data file
a. to save the data to secondary memory
b. to clear the data from secondary memory
c. to clear the data from the CPU
d. to save the data to the CPU
a
why do we use while loops when processing data files?
a. we know exactly how many lines are in the file
b because we are inputting values from the keyboard
c. we do not know ahead of time how many lines are in the file
d. because files contain special characters to mark the end of the file

,c
which of the following is used to mark the end of the line in a text file?
a. \n
b. \f
c. \e
d. \t
a
which of the following is not one of the three steps needed to import data
from a text file
a. open the file
b. add comments to each line of data in the file
c input and process the data
d close the file
b
the CPU carries out the commands from programs running in
main memory
main memory is _____________ and ______________
a. permanent, slow
b. temporary, slow
c. temporary, fast
d. permanent, fast
c
text files contain
characters
which of the following applies to functions and describes a reason we use
functions?

, a. to enable code to be reused
b. to stop the program from repeating
c. to ask the user for input
d. to test a condition for true and false
a
the ___________ keyword is used to create a function
def
a variable used to send information to a function is called a
a. constant
b. parameter
c. call
d. main
b
why do we use functions?
a to stop the program from repeating
b to test for true and false
c to simplify code
d to ask the user for input
c
the __________ go above the __________ in the source code file
a main program, return
b main program, functions
c subprograms, main program
d def, functions
c

Document information

Uploaded on
February 12, 2025
Number of pages
22
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$16.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
saraciousstuvia
4.0
(118)
Sold
572
Followers
380
Items
11336
Last sold
4 weeks ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions