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






2. A sequence of one or more characters used to specify the boundary between separate parts of text.






3. A way of writing mathematical expressions with the operators after the operands.






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






5. A set of values. The type of a value determines how it can be used in expressions. So far the types you have seen are integers (type int) and floating-point numbers (type float) and strings (type str).






6. A variable that is defined inside a class definition but outside any method. These are accessible from any method in the class and are shared by all instances of the class.






7. Another name for a runtime error.






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






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






10. Multiple variables that contain references to the same object.






11. The statement in a recursive function with is a call to itself.






12. A syntactic container providing a context for names so that the same name can reside in different namespaces without ambiguity.






13. A user-defined compound type. A class can also be thought of as a template for the objects that are instances of it.






14. An integer variable or value that indicates an element of a list.






15. A program stored in a file (usually one that will be interpreted).






16. A data type (usually a collection of objects) that is defined by a set of operations but that can be implemented in a variety of ways.






17. A syntactic construct which enables lists to be generated from other lists using a syntax analogous to the mathematical set-builder notation.






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






19. Nodes that share a common parent.






20. A reference to a list node can be treated as a single object or as the first in a list of nodes.






21. A general process for solving a category of problems.






22. A change in the state of a program made by calling a function that is not a result of reading the return value from the function. Can only be produced by modifiers.






23. One program structure within another - such as a conditional statement inside a branch of another conditional statement.






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






25. The output of the compiler after it translates the program.






26. To create an instance of a class.






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






28. Another name for object code that is ready to be executed.






29. An invisible marker that keeps track of where the next character will be printed.






30. A class definition that implements an ADT with method definitions that are invocations of other methods - sometimes with simple transformations. It does no significant work but it improves or standardizes the interface seen by the client.






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






32. An ADT that defines the operations one might perform on a priority queue.






33. Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program.






34. A compound data type whose elements cannot be assigned new values.






35. A way to traverse a tree - visiting the left subtree and then the root and then the right subtree.






36. An ordered set of objects waiting for a service of some kind.






37. A string displayed by a command line interface indicating that commands can be entered.






38. One of the possible paths of the flow of execution determined by conditional execution.






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






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






41. A way of writing mathematical expressions with the operators between the operands.






42. An operation whose runtime does not depend on the size of the data structure.






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






44. A statement that executes a function. It consists of the name of the function followed by a list of arguments enclosed in parentheses.






45. One of the named data items that makes up an instance.






46. An item of data contained in a node.






47. To ________ a variable is to give it an initial value - usually in the context of multiple assignment.






48. A set of characters that are treated as a unit for purposes of parsing such as the words in a natural language.






49. Code that satisfies the syntactic and semantic requirements of an interface.






50. A data type which cannot be modified. Assignments to elements or slices of immutable types cause a runtime error.