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 - gives an alternative execution.






2. Less than or equal to symbol






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






4. modulo






5. multiply AND assignment operator






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






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






8. Greater than or equal symbol.






9. An operator that removes a value from a list.






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






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






12. assignment operator






13. Symbol used to create comments






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






15. Symbol used to create comments






16. subtract AND assignment operator






17. unction to read one line of a file






18. Symbol to subtract things from each other






19. Less than symbol






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






21. floor division AND assignment operator






22. Argument variable






23. turns an object into an integer






24. Symbol to add things together






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






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






27. turns an object into a string






28. This keyword begins a header for a body that repeats until the condition is no longer true.






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






30. Argument variable






31. Create a variable.






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






33. Function to read the contents of a file






34. single line comment






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






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






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






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






39. Empties the file - watch out if you care about the file.






40. Symbol to add things together






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






42. square root






43. turns an object into an integer






44. Symbol to multiply things






45. Reads just one line of a text file.






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






47. floor division






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






49. Adds something to a variable






50. exponent AND assignment operator






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