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. Where the parameters go. A necessary punctuation after any function even if it's empty.






2. absolute value






3. Symbol to add things together






4. turns an object into a string






5. Argument variable






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






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






8. prints its parameter to the console






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






10. Symbol used to create comments






11. modulus AND assignment operator






12. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.






13. deletes an item from a list






14. multiply AND assignment operator






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






16. Less than or equal to symbol






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






18. modulo






19. adds an item to a list






20. add AND assignment operator






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






22. Argument variable






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






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






25. returns the length of a string (number of characters)






26. This keyword in the body of a conditional - gives an alternative execution.






27. Less than or equal to symbol






28. divide AND assignment operator






29. assignment operator






30. Command to print to the screen






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






32. Modulus operator. It's the remainder after division






33. adds an item to a list






34. Less than symbol






35. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001






36. divide AND assignment operator






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






38. Prints a string to the screen which is converted using repr()






39. Modulus operator. It's the remainder after division






40. Symbol used to create comments






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






42. square root






43. Adds something to a variable






44. add AND assignment operator






45. Create a variable.






46. Prints a string to the screen which is converted using repr()






47. Function to read the contents of a file






48. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.






49. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011






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