CS 1110 - Introduction to Programming
Review for First Test
The following questions are provided to help you study for
the first test. Do not expect to see these exact questions on the test.
- As far as programs are concerned, what is the function of main memory? How about long term storage?
- What role does a processor play in running a program?
- Computer files are composed of binary information. What is binary?
- How would the number 40 be written in binary?
- What would be the decimal equivalent of the binary number 1000 0001? (We write them like that to make them more readable.)
- How many "characters" are represented in the original ASCII? How about in the extended ASCII?
- What are keywords? Why are they needed?
- What is machine language?
- What is the difference between a compiler and an interpreter?
- What is a high level language? How does it compare to assembly language?
- What is the language we are using in this class? Where can one download a copy of it?
- What are the two Python interfaces covered in the text? How do you exit them?
- What is a syntax error? How is it different from a logic error?
- How are pseudocoding and flowcharting alike and how are they different?
- What is a function? Name three built in functions we have used in class.
- With regard to functions, what is an argument? How does a programmer pass an argument to a function?
- What are the kinds of quotes we can use when using a string
as an argument? What might cause you to use one kind instead of another
- What is the character that marks the beginning of a comment in Python? What else is a comment called?
- What is a variable? What are the rules for variable names in Python?
- What rule should exist about captialization and variable names?
- How do we assign a value to a variable in a program?
- How can we have a user assign a value to a variable while the program is running?
- In addtion to the four most common math functions, what other math functions does Python have operators for, and what are they?
- What is the common mnemonic phrase for order of operation in computers? What does it stand for?
- What do int and float types mean in Python?
- What type would the answer be if you performed a math operation on an int and a float?
- How can you control the type of a variable if you allow a user to enter its value?
- What are escape characters? What characters need them when you want to print a string containing them?
- What is the difference between a variable and a constant? What should be the difference between the way you name them in Python?
- What are comparison operators?
- What kind of statements in Python need to use comparison operators?
- What is a code block? How does it behave differently from regular sequence when it follows an if conditional?
- What should be the file extension of a Python program? What can you use to write such a program?
- How many outcomes follow a simple if conditional?
- How many outcomes should be part of an if-else conditional?
- How many outcomes can there be in an if-elif-else structure?
- When you compare two strings in Python, how are they compared?
- Which letter in English has the lowest numeric ASCII value?
- What are the three classic Boolean operators?
- What are the possible values of a variable if it is type bool?
- What are two other names for iteration?
- In the case of a while loop, what must be true about its condition for the loop to run?
- What must eventually happen in a well constructed block for a condition-controlled loop?
- How is a count-controlled loop different from a condition-controlled loop?
- What is an infinite loop? Why is this a bad thing?
- What kind of loop is a for loop?
- What is the simple way the text shows us as the first way to write a for loop?
- How do you write a for loop with a range() function? What
are the three parameters described in the text for the range() function?
- Python has several augmented assignment operators. Write them down and explain them.
- What is a sentinel value? How is it useful to a user doing input?
- How do loops help with validation of data?
- If we have three loops, such that loop A is inside loop B,
and loop B is inside loop C, which loop will probably run the greatest
number of times? Why?