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.






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






3. assignment operator






4. A statement that displays a value on the screen.






5. Function to open or read a file






6. Writes stuff to the file.






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






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






9. floor division AND assignment operator






10. add AND assignment operator






11. square root






12. modulus AND assignment operator






13. subtract AND assignment operator






14. Argument variable






15. Argument variable






16. Greater than or equal symbol.






17. Symbol to add things together






18. turns an object into an integer






19. The extension for Python scripts






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






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






22. assignment operator






23. Command to print to the screen






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






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






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






27. exponent AND assignment operator






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






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






30. Symbol used to create comments






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






32. exponent AND assignment operator






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






34. multiply AND assignment operator






35. Command to print to the screen






36. turns an object into a string






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






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






39. This statement causes an exception.






40. square root






41. floor division






42. prints its parameter to the console






43. add AND assignment operator






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






45. writes stuff to the file






46. absolute value






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






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






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






50. Adds something to a variable