CS 1110 - Introduction to Programming

Review for First Test


  1. As far as programs are concerned, what is the function of main memory? How about long term storage?

  2. What role does a processor play in running a program?

  3. Computer files are composed of binary information. What is binary?

  4. How would the number 40 be written in binary?

  5. What would be the decimal equivalent of the binary number 1000 0001? (We write them like that to make them more readable.)

  6. How many "characters" are represented in the original ASCII? How about in the extended ASCII?

  7. What are keywords? Why are they needed?

  8. What is machine language?

  9. What is the difference between a compiler and an interpreter?

  10. What is a high level language? How does it compare to assembly language?

  11. What is the language we are using in this class? Where can one download a copy of it?

  12. What are the two Python interfaces covered in the text? How do you exit them?

  13. What is a syntax error? How is it different from a logic error?

  14. How are pseudocoding and flowcharting alike and how are they different?

  15. What is a function? Name three built in functions we have used in class.

  16. With regard to functions, what is an argument? How does a programmer pass an argument to a function?

  17. 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 kind?

  18. What is the character that marks the beginning of a comment in Python? What else is a comment called?

  19. What is a variable? What are the rules for variable names in Python?

  20. What rule should exist about captialization and variable names?

  21. How do we assign a value to a variable in a program?

  22. How can we have a user assign a value to a variable while the program is running?

  23. In addtion to the four most common math functions, what other math functions does Python have operators for, and what are they?

  24. What is the common mnemonic phrase for order of operation in computers? What does it stand for?

  25. What do int and float types mean in Python?

  26. What type would the answer be if you performed a math operation on an int and a float?

  27. How can you control the type of a variable if you allow a user to enter its value?

  28. What are escape characters? What characters need them when you want to print a string containing them?

  29. What is the difference between a variable and a constant? What should be the difference between the way you name them in Python?

  30. What are comparison operators?

  31. What kind of statements in Python need to use comparison operators?

  32. What is a code block? How does it behave differently from regular sequence when it follows an if conditional?

  33. What should be the file extension of a Python program? What can you use to write such a program?

  34. How many outcomes follow a simple if conditional?

  35. How many outcomes should be part of an if-else conditional?

  36. How many outcomes can there be in an if-elif-else structure?

  37. When you compare two strings in Python, how are they compared?

  38. Which letter in English has the lowest numeric ASCII value?

  39. What are the three classic Boolean operators?

  40. What are the possible values of a variable if it is type bool?

  41. What are two other names for iteration?

  42. In the case of a while loop, what must be true about its condition for the loop to run?

  43. What must eventually happen in a well constructed block for a condition-controlled loop?

  44. How is a count-controlled loop different from a condition-controlled loop?

  45. What is an infinite loop? Why is this a bad thing?

  46. What kind of loop is a for loop?

  47. What is the simple way the text shows us as the first way to write a for loop?

  48. How do you write a for loop with a range() function? What are the three parameters described in the text for the range() function?

  49. Python has several augmented assignment operators. Write them down and explain them.

  50. What is a sentinel value? How is it useful to a user doing input?

  51. How do loops help with validation of data?

  52. 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?