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. writes stuff to the file






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






3. Symbol to multiply things






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






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






6. deletes an item from a list






7. divide AND assignment operator






8. exponent AND assignment operator






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






10. Less than symbol






11. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.






12. Command to print to the screen






13. turns an object into a string






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






15. Less than or equal to symbol






16. Symbol to add things together






17. sets the file's current position






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






19. Greater than symbol






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






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






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






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






24. End header line.






25. Function to open or read a file






26. modulo






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






28. add AND assignment operator






29. turns an object into a string






30. Command to print to the screen






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






32. subtract AND assignment operator






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






34. multiply AND assignment operator






35. single line comment






36. exponent AND assignment operator






37. adds an item to a list






38. Greater than symbol






39. This keyword begins a header for a body that repeats until the condition is no longer true.






40. Symbol to multiply things






41. Function to write something to a file






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






43. absolute value






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






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






46. Less than symbol






47. floor division AND assignment operator






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






49. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.






50. floor division AND assignment operator