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. A logical operator which negates an expression so that it returns a value of True if the expression is false.






2. Function to read the contents of a file






3. turns an object into an integer






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






5. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.






6. The extension for Python scripts






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






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






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






10. Function to write something to a file






11. Symbol to subtract things from each other






12. modulo






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






14. Adds a new line character






15. floor division






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






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






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






19. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.






20. Writes stuff to the file.






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






22. prints its parameter to the console






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






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






25. empties the file






26. exponent AND assignment operator






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






28. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.






29. A logical operator which returns a value of True if either of the conditions is true.






30. Less than symbol






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






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






33. Symbol to add things together






34. Symbol used to create comments






35. Symbol to add things together






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






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






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






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






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






41. Less than or equal to symbol






42. absolute value






43. exponentiation






44. adds an item to a list






45. Greater than symbol






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






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






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






49. modulo






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







Sorry!:) No result found.

Can you answer 50 questions in 15 minutes?


Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests