Test your basic knowledge |

Basic Python 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. Adds something to a variable






2. This keyword begins the simplest form of a conditional statement.






3. Function to empty the contents of a file - no recovery is possible






4. A logical operator which requires two expressions to both be true.






5. End header line.






6. A keyword that does nothing but fill space to indicate code which will be written later.






7. Greater than symbol






8. exponent AND assignment operator






9. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111






10. Prints a string to the screen which is a signed decimal.






11. A statement that displays a value on the screen.






12. A logical operator which compares two operands and produces True if they are equal and False otherwise






13. Prints a string to the screen which will be Unicode.






14. divide AND assignment operator






15. divide AND assignment operator






16. Function to read the contents of a file






17. assignment operator






18. Adds a new line character






19. Greater than symbol






20. Where the parameters go. A necessary punctuation after any function even if it's empty.






21. unction to read one line of a file






22. A built-in function that converts integers and strings to floating-point numbers.






23. Function to empty the contents of a file - no recovery is possible






24. exponentiation






25. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).






26. subtract AND assignment operator






27. Command to print to the screen






28. multiply AND assignment operator






29. deletes an item from a list






30. Reads the contents of the file you can assign the result to a variable.






31. The keyword beginning a header that will create a loop.






32. Symbol to multiply things






33. Symbol used to create comments






34. floor division AND assignment operator






35. asks the user for a response and returns that response






36. modulo






37. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.






38. Adds a new line character






39. This statement causes an exception.






40. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.






41. subtract AND assignment operator






42. turns an object into a string






43. This keyword in the body of a conditional allows chained conditionals.






44. Less than symbol






45. Argument variable






46. absolute value






47. turns an object into a string






48. Function to write something to a file






49. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100






50. modulus AND assignment operator