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 subtract things from each other






2. modulo






3. floor division






4. Function to write something to a file






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






6. End header line.






7. absolute value






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






9. Adds a new line character






10. floor division AND assignment operator






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






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






13. Greater than or equal symbol.






14. modulus AND assignment operator






15. Symbol to add things together






16. The extension for Python scripts






17. Command to print to the screen






18. unction to read one line of a file






19. subtract AND assignment operator






20. Symbol to multiply things






21. Argument variable






22. exponentiation






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






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






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






26. prints its parameter to the console






27. divide AND assignment operator






28. A statement that assigns a value to a variable.






29. Symbol used to create comments






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






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






32. Writes stuff to the file.






33. Turns a line into a comment instead of executable code.






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






35. End header line.






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






37. Reads just one line of a text file.






38. single line comment






39. add AND assignment operator






40. This statement causes an exception.






41. The extension for Python scripts






42. Symbol to multiply things






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






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






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






46. modulus AND assignment operator






47. This statement exits a function. The remaining lines of the function are not executed.






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






49. Greater than or equal symbol.






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