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 multiply things






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






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






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. An operator to check whether two variables refer to the same object.






7. exponentiation






8. adds an item to a list






9. Function to read the contents of a file






10. Reads just one line of a text file.






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






12. Less than symbol






13. single line comment






14. Function to write something to a file






15. Function to write something to a file






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






17. Symbol used to create comments






18. Adds a new line character






19. floor division AND assignment operator






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






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






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






23. Argument variable






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






25. Less than symbol






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






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






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






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






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






31. Adds something to a variable






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






33. modulus AND assignment operator






34. subtract AND assignment operator






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






36. absolute value






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






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






39. writes stuff to the file






40. sets the file's current position






41. Less than or equal to symbol






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






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






44. add AND assignment operator






45. multiply AND assignment operator






46. A statement that breaks out of a loop.






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






48. square root






49. Adds a new line character






50. Greater than or equal symbol.






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