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






2. absolute value






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






4. Symbol to add things together






5. Command to print to the screen






6. modulo






7. Symbol to multiply things






8. single line comment






9. Prevents a runtime error from stopping the program.






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






11. Less than symbol






12. A built-in function that converts integers and strings to floating-point numbers.






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






14. exponentiation






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






16. Argument variable






17. Greater than symbol






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






19. A statement that breaks out of a loop.






20. turns an object into a string






21. The extension for Python scripts






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






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






24. Greater than symbol






25. writes stuff to the file






26. Symbol to subtract things from each other






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






28. sets the file's current position






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






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






31. turns an object into a string






32. absolute value






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






34. Function to read the contents of a file






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






36. Adds a new line character






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






38. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111






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






40. reads just one line of a text file & keeps track of where in the file you're at






41. The extension for Python scripts






42. empties the file






43. adds an item to a list






44. Greater than or equal symbol.






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






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






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






48. floor division






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






50. square root







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