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. prints its parameter to the console






2. exponent AND assignment operator






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






4. floor division






5. writes stuff to the file






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






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






8. Symbol to multiply things






9. rounds a number to the number of decimal points you choose






10. Symbol to add things together






11. assignment operator






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






13. Function to open or read a file






14. Greater than symbol






15. square root






16. exponentiation






17. turns an object into a string






18. A statement that assigns a value to a variable.






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






20. reads just one line of a text file & keeps track of where in the file you're at






21. The extension for Python scripts






22. divide AND assignment operator






23. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011






24. Greater than symbol






25. Writes stuff to the file.






26. multiply AND assignment operator






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






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






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






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






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






32. Symbol to multiply things






33. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011






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






35. Less than or equal to symbol






36. modulo






37. add AND assignment operator






38. Create a variable.






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






40. Command to print to the screen






41. Symbol to subtract things from each other






42. modulus AND assignment operator






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






44. sets the file's current position






45. deletes an item from a list






46. adds an item to a list






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






48. turns an object into a string






49. Function to open or read a file






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