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. There are exactly two boolean values: True and False.






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






3. The dot operator ( .) permits access to attributes and functions of a module.






4. To signal an exception using the raise statement.






5. A special method that is invoked automatically when a new object is created and that initializes the object's attributes.






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






7. A loop in which the terminating condition is never satisfied.






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






9. A program that translates higher level programming languages into basic instructions the CPU can understand.






10. An expression that is either true or false.






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






12. The sequence of characters read into the command interpreter in a command line interface.






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






14. Nodes that share a common parent.






15. One of the basic elements of the syntactic structure of a program - analogous to a word in a natural language.






16. A program (or the person who wrote it) that uses an ADT.






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






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






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






20. The process of finding and removing any of the three kinds of programming errors.






21. An error in a program that makes it do something other than what the programmer intended.






22. The meaning of a program.






23. The first part of a compound statement. Headers begin with a keyword and end with a colon (:)






24. Both as a noun and as a verb - it means to increase by 1.






25. One of the operators that combines boolean expressions: and or and not.






26. An object that belongs to a class.






27. A character that is used to separate tokens such as punctuation in a natural language.






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






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






30. It prevents a compiler from compiling.






31. Any of the characters that move the cursor without printing visible characters. The constant string.whitespace contains all the white-space characters.






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






33. A function that is defined inside a class definition and is invoked on instances of that class. :override:: To replace a default. Examples include replacing a default parameter with a particular argument and replacing a default method by providing a






34. To divide a large complex program into components (like functions) and isolate the components from each other (by using local variables - for example).






35. The class from which a child class inherits.






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






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






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






39. To prevent an exception from terminating a program using the try and except statements.






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






41. A method that acts as a middleman between a caller and a helper method - often making the method easier or less error-prone to invoke.






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






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






44. A parameter written in a function header with an assignment to a default value which it will receive if no corresponding argument is given for it in the function call.






45. The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely.






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






47. A function that returns a boolean value.






48. A program in a high-level language before being compiled.






49. A variable used to store an intermediate value in a complex calculation.






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