Python pprint module Quiz
FREE Online Courses: Click, Learn, Succeed, Start Now!
Quiz Summary
0 of 10 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 10 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 10
1. Question
The pprint is a _____ module.
CorrectIncorrect -
Question 2 of 10
2. Question
What parameter can be used to decrease the maximum number of characters in a line?
CorrectIncorrect -
Question 3 of 10
3. Question
___ function is used to check whether an object is recursive or not.
CorrectIncorrect -
Question 4 of 10
4. Question
____ function returns a formatted and easily readable string.
CorrectIncorrect -
Question 5 of 10
5. Question
The object PrettyPrinter in the pprint module is a ____.
CorrectIncorrect -
Question 6 of 10
6. Question
import pprint
basket = {“Apples”:5, “Banans”: 10, “Chocolates”: 2}
pprint.pprint(basket)
CorrectIncorrect -
Question 7 of 10
7. Question
import pprint
nums = {4: 1, 3: 2, 1: 1, 2: 3}
pprint.pprint(nums, sort_dicts=True)
CorrectIncorrect -
Question 8 of 10
8. Question
import pprint
li = [1, “python”, “2”, 2]
pprint.pformat(li)
CorrectIncorrect -
Question 9 of 10
9. Question
import pprint
li = [1,2]
li.append(li)
print(pprint.isrecursive(li))
CorrectIncorrect -
Question 10 of 10
10. Question
import pprint
myprinter = pprint.PrettyPrinter(depth=1)
dict1 = {“numbers”:[i for i in range(1, 11)]}
myprinter.pprint(dict1)
CorrectIncorrect