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 is a signed decimal.






2. End header line.






3. Function to read the contents of a file






4. Reads just one line of a text file.






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






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






7. deletes an item from a list






8. Symbol used to create comments






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






10. subtract AND assignment operator






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






12. Symbol to multiply things






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






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






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






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






17. writes stuff to the file






18. Symbol to subtract things from each other






19. Symbol to subtract things from each other






20. adds an item to a list






21. absolute value






22. Writes stuff to the file.






23. An operator that removes a value from a list.






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






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






26. Greater than or equal symbol.






27. divide AND assignment operator






28. deletes an item from a list






29. modulus AND assignment operator






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






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






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






33. Adds a new line character






34. Function to open or read a file






35. floor division AND assignment operator






36. exponentiation






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






38. Adds a new line character






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






40. This statement causes an exception.






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






42. modulo






43. sets the file's current position






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






45. Greater than or equal symbol.






46. unction to read one line of a file






47. turns an object into a string






48. Argument variable






49. empties the file






50. Create a variable.