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






2. square root






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






4. This keyword in the body of a conditional allows chained conditionals.






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






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






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






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






9. The extension for Python scripts






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






11. Writes stuff to the file.






12. A logical operator which requires two expressions to both be true.






13. prints its parameter to the console






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






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






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






17. Function to write something to a file






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






19. adds an item to a list






20. Less than symbol






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






22. exponentiation






23. deletes an item from a list






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






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






26. subtract AND assignment operator






27. Symbol to subtract things from each other






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






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






30. sets the file's current position






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






32. Symbol to multiply things






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






34. Function to close a file - it will not be able to be used again unless the file is opened.






35. modulus AND assignment operator






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






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






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






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






40. absolute value






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






42. unction to read one line of a file






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






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






45. Argument variable






46. End header line.






47. multiply AND assignment operator






48. Symbol to add things together






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






50. empties the 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