Define a function triple(n) with the docstring 'Triple the input value.' that returns n * 3
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Define a function triple(n) with the docstring 'Triple the input value.' that returns n * 3. Print triple(5) and triple(10).
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.