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






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






3. Argument variable






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






5. Less than symbol






6. floor division






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






8. prints its parameter to the console






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






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






11. Command to print to the screen






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






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






14. Less than or equal to symbol






15. Argument variable






16. floor division AND assignment operator






17. exponentiation






18. add AND assignment operator






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






20. Function to write something to a file






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






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






23. Symbol to subtract things from each other






24. turns an object into a string






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






26. modulus AND assignment operator






27. A statement that displays a value on the screen.






28. The extension for Python scripts






29. subtract AND assignment operator






30. Adds a new line character






31. Reads just one line of a text file.






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






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






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






35. The extension for Python scripts






36. turns an object into a string






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






38. modulus AND assignment operator






39. Function to write something to a file






40. absolute value






41. Writes stuff to the file.






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






43. Greater than or equal symbol.






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






45. add AND assignment operator






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






47. A statement that breaks out of a loop.






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






49. Symbol to multiply things






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