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. A data type for representing numbers with fractional values.






2. Symbol to subtract things from each other






3. subtract AND assignment operator






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






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






6. Command to print to the screen






7. End header line.






8. Less than symbol






9. multiply AND assignment operator






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






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






12. prints its parameter to the console






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






14. Argument variable






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






16. Symbol to add things together






17. modulus AND assignment operator






18. exponentiation






19. absolute value






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






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






22. adds an item to a list






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






24. Less than symbol






25. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.






26. empties the file






27. single line comment






28. unction to read one line of a file






29. Argument variable






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






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






32. add AND assignment operator






33. floor division AND assignment operator






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






35. assignment operator






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






37. divide AND assignment operator






38. modulus AND assignment operator






39. square root






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






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






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






43. deletes an item from a list






44. Prints a string to the screen which will be Unicode.






45. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).






46. adds an item to a list






47. divide AND assignment operator






48. Less than or equal to symbol






49. exponent AND assignment operator






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