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. deletes an item from a list






2. Adds something to a variable






3. Argument variable






4. turns an object into an integer






5. Greater than symbol






6. exponentiation






7. A statement that ends the current iteration of a loop but continues looping.






8. Symbol to add things together






9. writes stuff to the file






10. A statement that breaks out of a loop.






11. assignment operator






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






13. Function to write something to a file






14. Greater than or equal symbol.






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






16. turns an object into a string






17. add AND assignment operator






18. turns an object into a string






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






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






21. Writes stuff to the file.






22. empties the file






23. The extension for Python scripts






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






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






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






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






28. The extension for Python scripts






29. absolute value






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






31. Adds a new line character






32. Less than symbol






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






34. floor division AND assignment operator






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






36. Symbol to multiply things






37. deletes an item from a list






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






39. Symbol to subtract things from each other






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






41. Argument variable






42. A built-in function that converts its argument to a string.






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






44. Function to open or read a file






45. adds an item to a list






46. multiply AND assignment operator






47. End header line.






48. modulus AND assignment operator






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






50. floor division