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. This keyword in the body of a conditional allows chained conditionals.






2. writes stuff to the file






3. A statement that breaks out of a loop.






4. Symbol used to create comments






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






6. exponent AND assignment operator






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






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






9. Prevents a runtime error from stopping the program.






10. Greater than or equal symbol.






11. Function to write something to a file






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






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






14. prints its parameter to the console






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






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






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






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






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






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






21. Prints a string to the screen which is converted using repr()






22. End header line.






23. Create a variable.






24. floor division






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






26. divide AND assignment operator






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






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






29. multiply AND assignment operator






30. unction to read one line of a file






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






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






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






34. assignment operator






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






36. turns an object into an integer






37. divide AND assignment operator






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






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






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






41. square root






42. Less than or equal to symbol






43. turns an object into a string






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






45. Command to print to the screen






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






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






48. Adds a new line character






49. single line comment






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







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