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






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






3. subtract AND assignment operator






4. Function to open or read a file






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






6. square root






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






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






9. multiply AND assignment operator






10. Greater than or equal symbol.






11. Function to read the contents of a file






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






13. floor division






14. Symbol to add things together






15. A logical operator which negates an expression so that it returns a value of True if the expression is false.






16. Function to read the contents of a file






17. turns an object into an integer






18. Reads just one line of a text file.






19. floor division AND assignment operator






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






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






22. square root






23. deletes an item from a list






24. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000






25. divide AND assignment operator






26. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.






27. absolute value






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






29. Symbol to subtract things from each other






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






31. Create a variable.






32. Command to print to the screen






33. Symbol used to create comments






34. modulo






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






36. floor division AND assignment operator






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






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






39. absolute value






40. End header line.






41. Adds a new line character






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






43. single line comment






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






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






46. Less than symbol






47. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.






48. An operator to check whether two variables refer to the same object.






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






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