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






2. This statement exits a function. The remaining lines of the function are not executed.






3. Create a variable.






4. Symbol to add things together






5. Symbol to subtract things from each other






6. Function to read the contents of a file






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






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






9. Function to open or read a file






10. prints its parameter to the console






11. exponent AND assignment operator






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






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






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






15. Symbol used to create comments






16. Command to print to the screen






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






18. Argument variable






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






20. modulo






21. Reads just one line of a text file.






22. Adds a new line character






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






24. Adds something to a variable






25. Greater than symbol






26. Symbol to multiply things






27. floor division






28. Symbol used to create comments






29. subtract AND assignment operator






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






31. Argument variable






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






33. modulo






34. turns an object into an integer






35. Function to write something to a file






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






37. multiply AND assignment operator






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






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






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






41. exponent AND assignment operator






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






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






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






45. divide AND assignment operator






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






47. floor division AND assignment operator






48. Less than or equal to symbol






49. empties the file






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







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