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. Greater than or equal symbol.






2. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111






3. Argument variable






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






5. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111






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






7. multiply AND assignment operator






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






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






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






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






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






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






14. Empties the file - watch out if you care about the file.






15. divide AND assignment operator






16. exponent AND assignment operator






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






18. End header line.






19. Greater than symbol






20. An operator that removes a value from a list.






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






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






23. Argument variable






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






25. turns an object into a string






26. empties the file






27. A built-in function that converts integers and strings to floating-point numbers.






28. Function to open or read a file






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






30. Symbol to add things together






31. deletes an item from a list






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






33. A statement that assigns a value to a variable.






34. absolute value






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






36. Adds something to a variable






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






38. Less than or equal to symbol






39. exponent AND assignment operator






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






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






42. Symbol to multiply things






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






44. writes stuff to the file






45. unction to read one line of a file






46. modulo






47. prints its parameter to the console






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






49. Less than symbol






50. This keyword begins a header for a body that repeats until the condition is no longer true.