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. Symbol to multiply things






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






3. assignment operator






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






5. Writes stuff to the file.






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






7. floor division AND assignment operator






8. Less than or equal to symbol






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






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






11. square root






12. Symbol used to create comments






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






14. turns an object into a string






15. modulo






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






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






18. This keyword begins a header for a body that repeats until the condition is no longer true.






19. The extension for Python scripts






20. add AND assignment operator






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






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






23. Function to write something to a file






24. exponentiation






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






26. Command to print to the screen






27. Adds something to a variable






28. Function to open or read a file






29. Function to read the contents of a file






30. exponent AND assignment operator






31. Symbol to multiply things






32. A logical operator which negates an expression so that it returns a value of True if the expression is false.






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






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






35. turns an object into a string






36. modulus AND assignment operator






37. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.






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






39. Command to print to the screen






40. Argument variable






41. divide AND assignment operator






42. End header line.






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






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






45. Greater than or equal symbol.






46. multiply AND assignment operator






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






48. subtract AND assignment operator






49. Argument variable






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