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. reads just one line of a text file & keeps track of where in the file you're at






2. assignment operator






3. Function to open or read a file






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






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






6. Greater than or equal symbol.






7. turns an object into an integer






8. adds an item to a list






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






10. Less than or equal to symbol






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






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






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






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






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






16. deletes an item from a list






17. Prevents a runtime error from stopping the program.






18. This keyword attempts to do something that would cause the program to crash if it were not for this statement.






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






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






21. turns an object into a string






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






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






24. Create a variable.






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






26. Less than or equal to symbol






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






28. Less than symbol






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






30. exponentiation






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






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






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






34. exponentiation






35. Function to write something to a file






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






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






38. This statement causes an exception.






39. absolute value






40. Symbol to multiply things






41. Less than symbol






42. Function to write something to a file






43. Adds a new line character






44. subtract AND assignment operator






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






46. unction to read one line of a file






47. square root






48. A statement that breaks out of a loop.






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






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