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. unction to read one line of a file






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






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






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






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






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






7. This statement causes an exception.






8. Function to write something to a file






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






10. Adds something to a variable






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






12. unction to read one line of a file






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






14. floor division AND assignment operator






15. Prevents a runtime error from stopping the program.






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






17. Adds a new line character






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






19. absolute value






20. Less than or equal to symbol






21. subtract AND assignment operator






22. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.






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






24. single line comment






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






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






27. End header line.






28. multiply AND assignment operator






29. The extension for Python scripts






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






31. A keyword that does nothing but fill space to indicate code which will be written later.






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






33. assignment operator






34. Create a variable.






35. Greater than or equal symbol.






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






37. deletes an item from a list






38. Symbol to add things together






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






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






41. Function to read the contents of a file






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






43. divide AND assignment operator






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






45. Create a variable.






46. A statement that breaks out of a loop.






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






48. multiply AND assignment operator






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






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







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