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. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.






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






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






4. modulo






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






6. End header line.






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






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






9. Argument variable






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






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






12. turns an object into an integer






13. prints its parameter to the console






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






15. This statement causes an exception.






16. exponent AND assignment operator






17. deletes an item from a list






18. divide AND assignment operator






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






20. subtract AND assignment operator






21. Symbol to subtract things from each other






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






23. End header line.






24. Symbol to multiply things






25. Symbol to add things together






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






27. adds an item to a list






28. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.






29. Function to read the contents of a file






30. square root






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






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






33. Function to read the contents of a file






34. modulo






35. Argument variable






36. assignment operator






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






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






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






40. Symbol to subtract things from each other






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






42. add AND assignment operator






43. multiply AND assignment operator






44. unction to read one line of a file






45. Writes stuff to the file.






46. A statement that breaks out of a loop.






47. modulus AND assignment operator






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






49. empties the file






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






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