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. A function that calls itself recursively without ever reaching the base case - ultimately causes a runtime error.






2. Any one of the languages that people speak that evolved naturally.






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






4. A function that changes one or more of the objects it receives as parameters. Most modifiers are void.






5. The class from which a child class inherits.






6. A string constant on the first line of a function or module definition - they provide a convenient way to associate documentation with code.






7. An assertion that must be true in order for a method to work correctly.






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






9. Any one of the languages that people have designed for specific purposes - such as representing mathematical ideas or computer programs; all programming languages are formal languages.






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






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






12. A list of the functions that are executing - printed when a runtime error occurs. Also commonly refered to as a stack trace since it lists the functions in the order in which they are stored in the runtime stack.






13. To signal an exception using the raise statement.






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






15. The value given to an optional parameter if no argument for it is provided in the function call.






16. A character or string used to indicate where a string should be split.






17. A statement that causes the current iteration of a loop to end.






18. An assertion that should be true of an object at all times (except perhaps while the object is being modified).






19. A graphical representation of a set of variables and the values to which they refer.






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






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






22. A data type in which the values are made up of components or elements that are themselves values.






23. An error in a program.






24. One of the pairs of items in a dictionary. Values are looked up in a dictionary by key.






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






26. A thing to which a variable can refer.






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






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






29. The block of statements in a compound statement that follows the header.






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






31. An escape character '' followed by one or more printable characters used to designate a nonprintable character.






32. A data type comprised of a collection of keys and associated values.






33. One of the operators that compares two values: == or != or > or < or >= and <=.






34. A number or string (or other things to be named later) that can be stored in a variable or computed in an expression.






35. A special character that causes the cursor to move to the next tab stop on the current line.






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






37. A function that yields a return value.






38. The ability to define a new class that is a modified version of a previously defined class.






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 variable in the sys module which stores a list of command line arguments passed to a program at run time.






42. A special character that causes the cursor to move to the beginning of the next line.






43. A reference stored in an attribute of an object.






44. A way to traverse a tree - visiting the children of each node before the node itself.






45. A variable or value used to select a member of an ordered set - such as a character from a string.






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






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






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






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






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