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. Symbol to add things together






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






3. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.






4. Symbol to subtract things from each other






5. writes stuff to the file






6. empties the file






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






8. turns an object into an integer






9. floor division AND assignment operator






10. single line comment






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






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






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






14. Reads the contents of the file you can assign the result to a variable.






15. floor division AND assignment operator






16. Adds a new line character






17. assignment operator






18. Argument variable






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






20. add AND assignment operator






21. A statement that breaks out of a loop.






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






23. Function to read the contents of a file






24. Function to write something to a file






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






26. modulus AND assignment operator






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






28. Greater than symbol






29. Command to print to the screen






30. Greater than or equal symbol.






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






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






33. floor division






34. deletes an item from a list






35. multiply AND assignment operator






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






37. Symbol to subtract things from each other






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






39. Argument variable






40. Symbol used to create comments






41. Function to open or read a file






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






43. turns an object into an integer






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






45. unction to read one line of a file






46. Less than symbol






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






48. This statement causes an exception.






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






50. Symbol to multiply things