The Inverted Triangle
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L3
Problem
Given positive integer n, return a list of n strings. Row 0 has n asterisks, row 1 has n-1, ..., row n-1 has 1 asterisk.
Summary
A pattern of stars narrows toward the bottom.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.