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. Prints a string to the screen which will be Unicode.






2. add AND assignment operator






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






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






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






6. Less than symbol






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






8. A statement that ends the current iteration of a loop but continues looping.






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






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






11. Adds something to a variable






12. Symbol to add things together






13. Symbol to multiply things






14. Symbol used to create comments






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






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






17. turns an object into an integer






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






19. floor division AND assignment operator






20. modulo






21. Adds something to a variable






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






23. floor division






24. Command to print to the screen






25. Greater than or equal symbol.






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






27. modulus AND assignment operator






28. Symbol to subtract things from each other






29. subtract AND assignment operator






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






31. divide AND assignment operator






32. exponent AND assignment operator






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






34. A built-in function that converts its argument to a string.






35. Function to read the contents of a file






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






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






38. The extension for Python scripts






39. deletes an item from a list






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






41. multiply AND assignment operator






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






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






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






45. A statement that breaks out of a loop.






46. assignment operator






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






48. Function to write something to a file






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






50. sets the file's current position