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






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






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






4. Greater than symbol






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






6. square root






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






8. exponentiation






9. prints its parameter to the console






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






11. assignment operator






12. The extension for Python scripts






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






14. An operator to check whether two variables refer to the same object.






15. Greater than or equal symbol.






16. writes stuff to the file






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






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






19. This keyword attempts to do something that would cause the program to crash if it were not for this statement.






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






21. Adds something to a variable






22. prints its parameter to the console






23. deletes an item from a list






24. empties the file






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






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






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






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






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






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






31. Less than symbol






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






33. Argument variable






34. floor division






35. Symbol to multiply things






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






37. floor division AND assignment operator






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






39. Less than symbol






40. Function to open or read a file






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






42. Greater than symbol






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






44. Create a variable.






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






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






47. Function to read the contents of a file






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






49. single line comment






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