Home > Web Development > Quizzes > Python Fundamentals Test
Python Fundamentals Test
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 19% Most missed: “What will typing the following at the Python interpreter produce?”
Python Fundamentals Test
Time left 00:00
25 Questions

1. Given dictionary: a = {'foo': 1 - 'bar': 10} Which of the following removes the last key pair value ?
2. In Python (v2.6 and later) - the 'json' module is a part of the standard library.
3. What are assertions?
4. What are decorators?
5. Which of these is not a common Python web framework?
6. Is it possible to work with databases in Jython?
7. How can you define a tuple having one element?
8. The md5 and sha modules have been deprecated in favor of which module?
9. Are there tools available to help find bugs - or perform static analysis?
10. When opening a file - what is the difference between text mode and binary mode?
11. def fn(a - *b - **c): print(c) fn(5) What will be the output?
12. What file must a directory have in order to be an importable Python package?
13. What is a correct term for the following piece of Python syntax: 3 + 4
14. Which of these are built-in test modules of Python?
15. What is a list comprehension?
16. What does the print statement do?
17. Which is the correct code for obtaining a random whole number from 1 to 1 - 000 - 000 in Python 2.x?
18. A decorator in python ________
19. What will typing the following at the Python interpreter produce? sequence = ['A' - 'B' - 'C' - 'D' - 'E' - 'F'] ; sequence[:]
20. According to PEP8 python programs should generally be indented with:
21. What does the following do: a=1 - 2 - 3
22. Which of these is a valid way to implement switch-case in Python?
23. What does a function glob.glob do?
24. When opening the Python shell - the prompt you see is
25. The range(n) function returns values from...