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. exponent AND assignment operator






2. A statement that displays a value on the screen.






3. modulo






4. Less than or equal to symbol






5. Greater than or equal symbol.






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






7. floor division AND assignment operator






8. Less than symbol






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






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






11. This statement causes an exception.






12. absolute value






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






14. Symbol to add things together






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






16. Less than or equal to symbol






17. Adds something to a variable






18. unction to read one line of a file






19. floor division






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






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






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






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






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






25. Create a variable.






26. modulus AND assignment operator






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






28. multiply AND assignment operator






29. End header line.






30. Symbol to subtract things from each other






31. prints its parameter to the console






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






33. Symbol to multiply things






34. divide AND assignment operator






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






36. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.






37. Symbol used to create comments






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






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






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






41. Argument variable






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






43. Adds a new line character






44. Function to read the contents of a file






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






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






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






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






49. subtract AND assignment operator






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