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. Greater than or equal symbol.






2. divide AND assignment operator






3. exponent AND assignment operator






4. square root






5. writes stuff to the file






6. This keyword attempts to do something that would cause the program to crash if it were not for this statement.






7. Create a variable.






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






9. assignment operator






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






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






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






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






14. floor division






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






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






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






18. multiply AND assignment operator






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






20. End header line.






21. Greater than or equal symbol.






22. assignment operator






23. add AND assignment operator






24. Writes stuff to the file.






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






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






27. Function to open or read a file






28. Symbol used to create comments






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






30. floor division






31. turns an object into an integer






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






33. The extension for Python scripts






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






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






36. prints its parameter to the console






37. Function to read the contents of a file






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






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






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






41. exponentiation






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






43. Create a variable.






44. prints its parameter to the console






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






46. subtract AND assignment operator






47. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001






48. Symbol to add things together






49. Function to open or read a file






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