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






2. floor division






3. single line comment






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






5. modulus AND assignment operator






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






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






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






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






10. Symbol to subtract things from each other






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






12. modulus AND assignment operator






13. exponent AND assignment operator






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






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






16. Prevents a runtime error from stopping the program.






17. exponentiation






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






19. rounds a number to the number of decimal points you choose






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






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






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






23. Symbol to multiply things






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






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






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






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






28. Adds something to a variable






29. Greater than or equal symbol.






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






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






32. Symbol to add things together






33. Less than or equal to symbol






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






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






36. The extension for Python scripts






37. A statement that breaks out of a loop.






38. Less than symbol






39. Symbol used to create comments






40. absolute value






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






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






43. Create a variable.






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






45. This keyword in the body of a conditional allows chained conditionals.






46. Argument variable






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






48. deletes an item from a list






49. add AND assignment operator






50. Symbol to multiply things