Filters
Question type

Study Flashcards

What file access method can be used to read a single line of input and return the line as a string, including the newline character?


A) getline
B) readline
C) fetch
D) read

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

B

The two digits in the base two number system are 0 and 1.

A) True
B) False

Correct Answer

verifed

verified

A module behaves like a function, but has a slightly different syntax.

A) True
B) False

Correct Answer

verifed

verified

The encryption method that replaces a character in a text with another character some given distance away in the alphabet from the original is known as what type of cipher?


A) Alpha cipher
B) Caesar cipher
C) Jumble cipher
D) Alternate cipher

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Data can be output to a text file using a(n) output object.

A) True
B) False

Correct Answer

verifed

verified

The decimal number system, which utilizes the numbers 0-9, is also known as what number system?


A) The base-9 numbering system.
B) The base-10 numbering system.
C) The Octal numbering system.
D) The hexadecimal numbering system.

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

Many applications now use data mangling to protect information transmitted on networks.

A) True
B) False

Correct Answer

verifed

verified

The string method isalphabetic returns True if the string contains only letters or False otherwise.

A) True
B) False

Correct Answer

verifed

verified

Your script is parsing filenames and is creating a count of how many files per file extension type exist within a directory. What slice could you use to extract the file extension substring, assuming the extensions are three letters only?


A) filename[-3:]
B) filename[-3]
C) filename[:-3]
D) filename[$-3]

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

When you launch Python, what file system path does it start with?


A) The root directory of the file system.
B) The current working directory.
C) The same folder as the Python executable file.
D) The user's home folder.

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

What specific Python module can you use to determine the file size in bytes of a given file?


A) os.stat
B) io.file
C) os.path
D) file.ops

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

What does a block cipher utilize in order to change plaintext characters into two or more encrypted characters?


A) A mathematical structure known as an invertible matrix.
B) A random noise sampling from the computer's hardware.
C) A pseudorandom number generator defined by the encrypting language.
D) A hardware encryption chip designed to perform obfuscation.

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

A data structure is a compound unit that consists of several smaller pieces of data.

A) True
B) False

Correct Answer

verifed

verified

True

You are running a Python script that is supposed to write data to an open file, but discover that the file contents are being erased each time the script runs. What is most likely the issue?


A) The file was opened using a mode string other than 'a'.
B) The file is truncated by default with the write() method.
C) The file is erased when the script uses the close() method.
D) The file must be opened using a mode string of 'rw'.

E) None of the above
F) B) and C)

Correct Answer

verifed

verified

The remove file system function is included in the os.path module.

A) True
B) False

Correct Answer

verifed

verified

What does a mode string of 'r' indicate when opening a file in Python?


A) The file will be opened for random access.
B) The file will be opened for read access.
C) The file will be opened for write access.
D) The file will be opened in binary mode.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

The decimal number system is also called the base ten number system.

A) True
B) False

Correct Answer

verifed

verified

A method is always called with a given data value called an object, which is placed before the method name in the call.

A) True
B) False

Correct Answer

verifed

verified

The absolute value of a digit is determined by raising the base of the system to the power specified by the position (baseposition).

A) True
B) False

Correct Answer

verifed

verified

In the binary number system, each digit or bit has a positional value that is a power of what?


A) 1
B) 2
C) 8
D) 16

E) None of the above
F) B) and D)

Correct Answer

verifed

verified

B

Showing 1 - 20 of 50

Related Exams

Show Answer