Definitions and Misc
History and Binary
Types and Operations
Selection and Loops
Strings and Files
100

What is an algorithm?

a step-by-step process that will eventually solve a problem

100

What technology replaced the vacuum tube as the mechanism for implementing electronic switches in computer hardware?

Transistor

100

What is the result of 4 % 10?

4

100

Which statement can be used to stop a loop and jump to the next statement after the loop?

Break

100

What string method can you use to locate the lowest index in a string named s where substring "findme" is found?

s.find("findme")

200

What is the difference between syntax and semantics?

Syntax is the rules for forming legal statements
Semantics is the meaning of statements

200

Who is credited as having created the World Wide Web in 1992?

Tim Berners-Lee

200

What is the result of float(int(5.6))?

5.0

200

What is NOT a Boolean or logical operator used in the Python language from these (and, or, not xor)?

xor

200

What effect does the following print statement have?
print("Rambo" * 3)

Prints RamboRamboRambo

300

What term describes the process of substituting a simple process for a complex process in a program to make the program easier to understand and maintain?

Abstraction

300

What kind of programming language is Python?

An interpreted language

300

What is the order of mathematical operations?

PEMDAS

300

In evaluating a loop, you find the following statement: "value += 2". What happens to the value variable upon each iteration of the loop?

The variable is increased by 2 each iteration through the loop.

300

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

The file will be opened for write access

400

How is data stored in a computer?

Binary data

400

What is the decimal number 98 in binary?

1100010‬

400

Which of the following would be considered a float in Python? -1, 2.718, 3, or '42'

2.718

400

Assuming that the value of x is 8, and the value of y is 12, what is the value of the following expression? (x - y)**2 > y

True
400

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?

readline()

500

What in a computer is known as the processor?

CPU

500

What is the value of the binary number 10010110 in base-10?

150

500

What comparison operator can be used to test whether an expression does NOT equal another expression?

!=

500

What keyword is used for an definite loop, and a indefinite loop, respectively?

for and while

500

What happens if you attempt to access a string using an index equal to the string's length?

Index out of range error