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. square root






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






3. floor division AND assignment operator






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






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






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






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






8. The extension for Python scripts






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






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






11. writes stuff to the file






12. multiply AND assignment operator






13. divide AND assignment operator






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






15. exponent AND assignment operator






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






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






18. Argument variable






19. Adds something to a variable






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






21. Symbol to add things together






22. Less than symbol






23. turns an object into an integer






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






25. turns an object into a string






26. add AND assignment operator






27. modulus AND assignment operator






28. Function to write something to a file






29. Greater than symbol






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






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






32. prints its parameter to the console






33. Less than or equal to symbol






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






35. absolute value






36. End header line.






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






38. Reads the contents of the file you can assign the result to a variable.






39. sets the file's current position






40. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.






41. Symbol used to create comments






42. Create a variable.






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






44. Argument variable






45. adds an item to a list






46. Symbol used to create comments






47. Create a variable.






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






49. End header line.






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