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. This statement causes an exception.






2. Writes stuff to the file.






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






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






5. floor division AND assignment operator






6. Greater than symbol






7. prints its parameter to the console






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






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






10. Symbol to add things together






11. Symbol to subtract things from each other






12. divide AND assignment operator






13. add AND assignment operator






14. Adds something to a variable






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






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






17. floor division






18. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.






19. exponentiation






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






21. absolute value






22. Greater than symbol






23. Function to write something to a file






24. unction to read one line of a file






25. Create a variable.






26. exponent AND assignment operator






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






28. Less than symbol






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






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






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






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






33. Function to open or read a file






34. Greater than or equal symbol.






35. Greater than or equal symbol.






36. turns an object into an integer






37. adds an item to a list






38. absolute value






39. exponent AND assignment operator






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






41. Adds something to a variable






42. Create a variable.






43. adds an item to a list






44. turns an object into a string






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. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101






47. Symbol to multiply things






48. A data type for representing numbers with fractional values.






49. floor division AND assignment operator






50. single line comment