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. add AND assignment operator






2. Adds a new line character






3. reads just one line of a text file & keeps track of where in the file you're at






4. exponent AND assignment operator






5. deletes an item from a list






6. Function to open or read a file






7. modulus AND assignment operator






8. divide AND assignment operator






9. multiply AND assignment operator






10. exponent AND assignment operator






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






12. Command to print to the screen






13. exponentiation






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






15. Argument variable






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






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






18. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.






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






20. End header line.






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






22. Writes stuff to the file.






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






24. square root






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






26. absolute value






27. Function to write something to a file






28. prints its parameter to the console






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






30. floor division AND assignment operator






31. Symbol to subtract things from each other






32. turns an object into an integer






33. adds an item to a list






34. exponentiation






35. Symbol to add things together






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






37. Greater than or equal symbol.






38. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000






39. sets the file's current position






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






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






42. Less than or equal to symbol






43. Reads just one line of a text file.






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






45. adds an item to a list






46. Symbol to multiply things






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






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






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






50. A statement that breaks out of a loop.