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. Adds a new line character






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






4. Function to write something to a file






5. square root






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






7. Adds something to a variable






8. floor division AND assignment operator






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






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






11. sets the file's current position






12. A statement that breaks out of a loop.






13. assignment operator






14. single line comment






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






16. exponentiation






17. Less than symbol






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






19. Create a variable.






20. unction to read one line of a file






21. The extension for Python scripts






22. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.






23. Writes stuff to the file.






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






25. deletes an item from a list






26. Argument variable






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






28. Function to read the contents of a file






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






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






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






32. Function to empty the contents of a file - no recovery is possible






33. Symbol used to create comments






34. turns an object into a string






35. Less than or equal to symbol






36. divide AND assignment operator






37. assignment operator






38. adds an item to a list






39. add AND assignment operator






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






41. Symbol to subtract things from each other






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






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






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






45. modulus AND assignment operator






46. The extension for Python scripts






47. Create a variable.






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






49. modulus AND assignment operator






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