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. A logical operator which returns a value of True if either of the conditions is true.






2. Symbol to subtract things from each other






3. deletes an item from a list






4. square root






5. Less than or equal to symbol






6. adds an item to a list






7. Adds something to a variable






8. unction to read one line of a file






9. empties the file






10. absolute value






11. turns an object into a string






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






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






14. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.






15. floor division AND assignment operator






16. writes stuff to the file






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






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






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






20. modulo






21. Adds a new line character






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






23. Writes stuff to the file.






24. Greater than or equal symbol.






25. divide AND assignment operator






26. Symbol used to create comments






27. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.






28. Modulus operator. It's the remainder after division






29. Argument variable






30. Less than symbol






31. subtract AND assignment operator






32. Create a variable.






33. absolute value






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






35. subtract AND assignment operator






36. turns an object into an integer






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






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






39. Create a variable.






40. Greater than symbol






41. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.






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






43. exponent AND assignment operator






44. unction to read one line of a file






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






46. assignment operator






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






48. The extension for Python scripts






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






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






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