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. The keyword beginning a header that will create a new function.






2. Less than symbol






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






4. Symbol to subtract things from each other






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






6. The extension for Python scripts






7. writes stuff to the file






8. square root






9. Argument variable






10. single line comment






11. Symbol used to create comments






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






13. modulo






14. deletes an item from a list






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






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






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






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






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






20. Symbol to add things together






21. deletes an item from a list






22. An operator to check whether two variables refer to the same object.






23. sets the file's current position






24. Function to read the contents of a file






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






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






27. Less than symbol






28. A logical operator which negates an expression so that it returns a value of True if the expression is false.






29. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.






30. Greater than symbol






31. Create a variable.






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






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






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






35. adds an item to a list






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






37. Symbol to add things together






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






39. Greater than or equal symbol.






40. modulus AND assignment operator






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






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






43. prints its parameter to the console






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






45. unction to read one line of a file






46. Command to print to the screen






47. Function to write something to a file






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






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






50. Argument variable






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