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. divide AND assignment operator






2. Argument variable






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






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






5. Greater than symbol






6. turns an object into a string






7. assignment operator






8. modulus AND assignment operator






9. Symbol to add things together






10. Command to print to the screen






11. Create a variable.






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






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






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






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






16. Symbol to multiply things






17. Symbol used to create comments






18. Less than or equal to symbol






19. adds an item to a list






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






21. This statement causes an exception.






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






23. Function to write something to a file






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






25. End header line.






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






27. deletes an item from a list






28. Symbol to multiply things






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






30. floor division






31. exponent AND assignment operator






32. Where the parameters go. A necessary punctuation after any function even if it's empty.






33. Adds a new line character






34. single line comment






35. turns an object into an integer






36. sets the file's current position






37. absolute value






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






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






40. exponentiation






41. Create a variable.






42. Where the parameters go. A necessary punctuation after any function even if it's empty.






43. add AND assignment operator






44. subtract AND assignment operator






45. modulo






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






47. adds an item to a list






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






49. Function to open or read a file






50. add AND assignment operator