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. asks the user for a response and returns that response






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






4. Command to print to the screen






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






6. deletes an item from a list






7. End header line.






8. The extension for Python scripts






9. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.






10. Symbol to add things together






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






12. Symbol to multiply things






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






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






15. Less than symbol






16. Function to write something to a file






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






18. A statement that breaks out of a loop.






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






20. divide AND assignment operator






21. multiply AND assignment operator






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






23. Adds a new line character






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






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






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






27. floor division






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






29. unction to read one line of a file






30. modulo






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






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






33. Greater than or equal symbol.






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






35. Symbol to add things together






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






37. floor division AND assignment operator






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






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






40. Greater than symbol






41. Greater than or equal symbol.






42. subtract AND assignment operator






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






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






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






46. adds an item to a list






47. floor division






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






49. square root






50. add AND assignment operator