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. End header line.






2. sets the file's current position






3. prints its parameter to the console






4. modulus AND assignment operator






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






6. Greater than symbol






7. Symbol to multiply things






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






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






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






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






12. absolute value






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






14. Symbol to multiply things






15. add AND assignment operator






16. adds an item to a list






17. Command to print to the screen






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






19. Function to open or read a file






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






21. single line comment






22. unction to read one line of a file






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






24. subtract AND assignment operator






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






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






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






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






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






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






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






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






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






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






35. Greater than or equal symbol.






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






37. Symbol to add things together






38. unction to read one line of a file






39. modulo






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






41. Symbol to add things together






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






43. multiply AND assignment operator






44. subtract AND assignment operator






45. adds an item to a list






46. Adds something to a variable






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






48. floor division






49. exponent AND assignment operator






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






Can you answer 50 questions in 15 minutes?



Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests