Test your basic knowledge |

Programming

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. An embedded reference used to link one object to another.






2. Code that is used during program development but is not part of the final version.






3. The structure of a program.






4. A named entity - usually stored on a hard drive or floppy disk or CD-ROM - that contains a stream of characters.






5. A variable used to count something - usually initialized to zero and incremented in the body of a loop.






6. A loop inside the body of another loop.






7. A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.






8. It prevents a compiler from compiling.






9. A data item that is mapped to a value in a dictionary. Used to look up values in a dictionary.






10. A tree in which each node refers to zero or one or two dependent nodes.






11. An operator denoted with a percent sign ( %) - that works on integers and yields the remainder when one number is divided by another.






12. To replace something unnecessarily specific (like a constant value) with something appropriately general (like a variable or parameter). It makes code more versatile - more likely to be reused and sometimes even easier to write.






13. The topmost node in a tree with no parent.






14. A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function.






15. A reserved word that is used by the compiler to parse program; you cannot use keywords like if or def or while as variable names.






16. A branch of the conditional statement in a recursive function that does not result in a recursive call.






17. To translate a program written in a high-level language into a low-level language all at once - in preparation for later execution.






18. An error that occurs at runtime.






19. The process of adding a function header and parameters to a sequence of program statements. This process is very useful whenever the program statements in question are going to be used multiple times.






20. The second part of a compound statement. The body consists of a sequence of statements all indented the same amount from the beginning of the header.






21. A function that calls itself recursively without ever reaching the base case - ultimately causes a runtime error.






22. The rules that determine which member of a queue is removed next.






23. A combination of variables and operators and values that represents a single result value.






24. A data type that contains a sequence of elements of any type - like a list but is immutable. Can be used wherever an immutable type is required.






25. An operation defined in linear algebra that multiplies two Points and yields a numeric value.






26. A language that provides features - such as user-defined classes and inheritance - that facilitate object-oriented programming.






27. There are exactly two boolean values: True and False.






28. A way of developing programs starting with a prototype and gradually testing and improving it.






29. An error in a program that makes it impossible to parse






30. Given any real numbers a and b exactly one of the following relations holds: a < b or a > b or a = b. Thus when you can establish that two of the relations are false you can assume the remaining one is true. What is it called?






31. A thing to which a variable can refer.






32. A variable used as part of the terminating condition of a loop.






33. A file that contains printable characters organized into lines separated by newline characters.






34. One of the values in a list (or other sequence). The bracket operator selects elements of a list.






35. A statement which makes the objects contained in a module available for use within another module.






36. A bottom-most node in a tree with no children.






37. A definition which defines something in terms of itself. It often provides an elegant way to express complex data structures.






38. A variable in the sys module which stores a list of command line arguments passed to a program at run time.






39. An explicit statement that takes a value of one type and computes a corresponding value of another type.






40. To create a new object that has the same value as an existing object.






41. A queueing policy in which the first member to arrive is the first to be removed.






42. The order in which statements are executed during a program run.






43. Calling one function from within the body of another or using the return value of one function as an argument to the call of another.






44. The value provided as the result of a function call.






45. A style of program design in which the majority of functions are pure.






46. Function-like attribute of an object. Methods are invoked (called) on an object using the dot operator.






47. To follow the flow of execution of a program by hand - recording the change of state of the variables and any output produced.






48. Temporary storage of a precomputed value to avoid redundant computation.






49. A statement that creates a new function specifying its name and parameters and the statements it executes.






50. A function that does not modify any of the objects it receives as parameters. Most pure functions are fruitful.