PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Snap, Crackle, and OOP
Use Sololearn's "Snap, Crackle and Pop" Code Coach (medium difficulty) to practice some Object Oriented Programming (OOP) techniques.
☑ Give the file a docstring (this).
☑ Define a class.
☑ Let it inherit from another class.
☑ Give the class a docstring.
☑ Define a class variable.
☑ Define the __init__ method.
☑ Initialize an instance variable.
☑ Use the @staticmethod decorator.
☑ Use the @classmethod decorator.
☑ Use the @property decorator.
☑ Use the if __name__ idiom.
☑ Make everything readable.
☑ Run the file and pass the test cases.
Python code by Rain
"""
# Usage: To test this outside the
# Code Coach, enter 6 non-negative
# integers (or change 6 to whatever
# you want) on separate lines, e.g.:
# 0
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run