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. Prevents a runtime error from stopping the program.






3. multiply AND assignment operator






4. Symbol to add things together






5. exponentiation






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






7. modulo






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






9. turns an object into an integer






10. adds an item to a list






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






12. modulus AND assignment operator






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






14. Greater than or equal symbol.






15. turns an object into an integer






16. unction to read one line of a file






17. Greater than symbol






18. floor division AND assignment operator






19. Function to write something to a file






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






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






22. ,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.






23. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.






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






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






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






27. Symbol to subtract things from each other






28. absolute value






29. single line comment






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






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






32. unction to read one line of a file






33. square root






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






35. absolute value






36. The keyword beginning a header that will create a new function.






37. multiply AND assignment operator






38. Adds a new line character






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






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






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






42. This statement causes an exception.






43. The keyword beginning a header that will create a loop.






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






45. Symbol to add things together






46. A logical operator which compares two operands and produces True if they are equal and False otherwise






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






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






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






50. add AND assignment operator






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