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 & keeps track of where in the file you're at






2. turns an object into an integer






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






4. This statement exits a function. The remaining lines of the function are not executed.






5. The extension for Python scripts






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






7. square root






8. A statement that breaks out of a loop.






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






10. Less than or equal to symbol






11. Symbol to subtract things from each other






12. turns an object into an integer






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






14. exponentiation






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






16. Symbol to multiply things






17. Reads the contents of the file you can assign the result to a variable.






18. Greater than symbol






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






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






21. deletes an item from a list






22. floor division AND assignment operator






23. exponent AND assignment operator






24. modulo






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






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






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






28. Symbol used to create comments






29. add AND assignment operator






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






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






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






33. empties the file






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






35. Function to write something to a file






36. Function to open or read a file






37. single line comment






38. Adds something to a variable






39. unction to read one line of a file






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






41. Writes stuff to the file.






42. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.






43. adds an item to a list






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






45. The keyword beginning a header that will create a loop.






46. absolute value






47. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.






48. exponent AND assignment operator






49. Less than or equal to symbol






50. A logical operator which requires two expressions to both be true.







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