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. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011






2. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000






3. inserts an item inside a list at a certain index






4. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.






5. Symbol to multiply things






6. Command to print to the screen






7. exponentiation






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






9. rounds a number to the number of decimal points you choose






10. subtract AND assignment operator






11. assignment operator






12. An operator to check whether two variables refer to the same object.






13. A logical operator which returns a value of True if either of the conditions is true.






14. An operator that removes a value from a list.






15. The keyword beginning a header that will create a new function.






16. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000






17. End header line.






18. Symbol used to create comments






19. modulo






20. floor division






21. reads just one line of a text file & keeps track of where in the file you're at






22. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.






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






24. absolute value






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






26. assignment operator






27. deletes an item from a list






28. A built-in function that converts its argument to a string.






29. sets the file's current position






30. Symbol used to create comments






31. Less than or equal to symbol






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






33. divide AND assignment operator






34. Function to close a file - it will not be able to be used again unless the file is opened.






35. Symbol to divide by the number to the right of the symbol






36. Greater than symbol






37. Symbol to add things together






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






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






40. Symbol to add things together






41. Function to close a file - it will not be able to be used again unless the file is opened.






42. unction to read one line of a file






43. Symbol to divide by the number to the right of the symbol






44. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.






45. Empties the file - watch out if you care about the file.






46. End header line.






47. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101






48. square root






49. prints its parameter to the console






50. turns an object into a string