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






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






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






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






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






6. exponent AND assignment operator






7. Less than or equal to symbol






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






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






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






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






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






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






14. Function to open or read a file






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






16. turns an object into an integer






17. exponentiation






18. deletes an item from a list






19. absolute value






20. add AND assignment operator






21. square root






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






23. assignment operator






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






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






26. Command to print to the screen






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






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






29. floor division






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






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






32. exponentiation






33. multiply AND assignment operator






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






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






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






37. Function to read the contents of a file






38. square root






39. prints its parameter to the console






40. Less than symbol






41. subtract AND assignment operator






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






43. adds an item to a list






44. unction to read one line of a file






45. Command to print to the screen






46. absolute value






47. Adds something to a variable






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






49. divide AND assignment operator






50. Symbol to subtract things from each other