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. square root






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






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






4. exponentiation






5. Adds something to a variable






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






7. prints its parameter to the console






8. A statement that breaks out of a loop.






9. modulo






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






11. absolute value






12. divide AND assignment operator






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






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






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. exponent AND assignment operator






17. add AND assignment operator






18. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111






19. Greater than symbol






20. turns an object into an integer






21. unction to read one line of a file






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






23. Create a variable.






24. The extension for Python scripts






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






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






27. prints its parameter to the console






28. deletes an item from a list






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






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






31. exponent AND assignment operator






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






33. Prints a string to the screen which is converted using repr()






34. sets the file's current position






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






36. Symbol to multiply things






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






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






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






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






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






42. Function to open or read a file






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






44. absolute value






45. Command to print to the screen






46. exponentiation






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






48. floor division






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






50. Adds a new line character






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