You can use 2 for loops, one if and one else. You have to take input from user and print it in star pattern. Use python language.
Learn more efficiently, for free:
Introduction to Python
7.1M learners
Introduction to Java
4.7M learners
Introduction to C
1.5M learners
Introduction to HTML
7.5M learners