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 multiply things






2. Less than or equal to symbol






3. modulo






4. Symbol used to create comments






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






6. Greater than symbol






7. Argument variable






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






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






10. exponentiation






11. Function to read the contents of a file






12. divide AND assignment operator






13. adds an item to a list






14. assignment operator






15. Adds something to a variable






16. This statement causes an exception.






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






18. subtract AND assignment operator






19. unction to read one line of a file






20. The extension for Python scripts






21. deletes an item from a list






22. floor division






23. prints its parameter to the console






24. End header line.






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






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






27. square root






28. Adds something to a variable






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






30. turns an object into a string






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






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






33. writes stuff to the file






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






35. floor division AND assignment operator






36. A statement that breaks out of a loop.






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






38. multiply AND assignment operator






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






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






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






42. Argument variable






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






44. multiply AND assignment operator






45. turns an object into an integer






46. Create a variable.






47. Symbol to subtract things from each other






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






49. Prevents a runtime error from stopping the program.






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