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 converted using repr()






2. Create a variable.






3. Symbol to add things together






4. Command to print to the screen






5. Create a variable.






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






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






8. adds an item to a list






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






10. Argument variable






11. A built-in function that converts integers and strings to floating-point numbers.






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






13. Function to read the contents of a file






14. The extension for Python scripts






15. writes stuff to the file






16. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.






17. Turns a line into a comment instead of executable code.






18. Greater than symbol






19. Symbol to subtract things from each other






20. Function to write something to a file






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






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






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






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






25. Function to write something to a file






26. add AND assignment operator






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






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






29. This statement causes an exception.






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






31. exponent AND assignment operator






32. sets the file's current position






33. assignment operator






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






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






36. Symbol to subtract things from each other






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






38. divide AND assignment operator






39. absolute value






40. End header line.






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






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






43. single line comment






44. exponentiation






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






46. Greater than symbol






47. deletes an item from a list






48. Symbol used to create comments






49. Less than or equal to symbol






50. Function to open or read a file