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. deletes an item from a list






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






3. prints its parameter to the console






4. The extension for Python scripts






5. Function to read the contents of a file






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






7. adds an item to a list






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






9. adds an item to a list






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






11. Function to open or read a file






12. divide AND assignment operator






13. add AND assignment operator






14. Greater than or equal symbol.






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






16. subtract AND assignment operator






17. Greater than symbol






18. assignment operator






19. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101






20. Argument variable






21. absolute value






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






23. Create a variable.






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






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






26. add AND assignment operator






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






28. Less than or equal to symbol






29. turns an object into a string






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






31. multiply AND assignment operator






32. Writes stuff to the file.






33. Less than symbol






34. This statement causes an exception.






35. Command to print to the screen






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






37. square root






38. exponent AND assignment operator






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






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. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.






42. turns an object into a string






43. modulo






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






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






46. Symbol used to create comments






47. Adds a new line character






48. A built-in function that converts its argument to a string.






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






50. Function to write something to a file







Sorry!:) No result found.

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