proffreda

Python Quiz Week 2

Jun 22nd, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. CS2021 
Quiz Week 2
  2.  
  3. What is meant by the phrase “Everything is an object in Python, except variables”?
  4.  
  5. Can two different variables refer to same object?
  6.  
  7. What type of quotes are needed to represent a string object?
  8. 'Single Quotes'
  9. "Double Quotes"
  10. """Triple Quotes""" or '''triple quotes'''
  11.  
  12. What are the 4 main python data structures?
  13.  
  14. Given a list definition:
  15. list1 = ['a', 'b', 'c’]
  16. What are main methods we can perform with list1?
  17.  
  18. How can you find out all possible valid methods on objects and how to find docs on those methods?
  19.  
  20. How do you iterate through all elements of list1?
  21.  
  22. T/F
  23. Functions take parameters of any type?
  24. T/F
  25. Functions can take any number of parameters?
  26. T/F
  27. Functions can be assigned to variables?
  28. T/F
  29. Functions can be passed as parameters to a function?
  30.  
  31.  
  32.  
  33. What is a namespace?
  34.  
  35. What is a scope?
  36.  
  37. What scopes are searched to find a name in a namespace?
  38.  
  39. What is a module and what does it mean to import them?
  40.  
  41. What is difference between
  42. from <module> import <name>
  43. from <module> import *
  44. import <module>
  45.  
  46.  
  47. What is the default IDE for python?
  48.  
  49.  
  50. Name some well-known python IDEs
Add Comment
Please, Sign In to add comment