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. reads just one line of a text file & keeps track of where in the file you're at






3. square root






4. assignment operator






5. floor division AND assignment operator






6. single line comment






7. Adds something to a variable






8. absolute value






9. exponent AND assignment operator






10. add AND assignment operator






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






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






13. Greater than symbol






14. unction to read one line of a file






15. prints its parameter to the console






16. asks the user for a response and returns that response






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






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






19. Symbol to multiply things






20. absolute value






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






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






23. Writes stuff to the file.






24. prints its parameter to the console






25. Adds a new line character






26. A statement that breaks out of a loop.






27. subtract AND assignment operator






28. Greater than symbol






29. adds an item to a list






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






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






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






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






34. Greater than or equal symbol.






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






36. writes stuff to the file






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






38. modulo






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






40. floor division






41. empties the file






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






43. Symbol to add things together






44. A data type for representing numbers with fractional values.






45. Prevents a runtime error from stopping the program.






46. modulus AND assignment operator






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






48. deletes an item from a list






49. End header line.






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