CodeUp - CodeUp Level 1

Ask your question

To send us your message, you need to log in first.

Question from the instructor or inquiry

Inverted Triangle

Write a program that prints an inverted triangle. Use the * symbol to draw the triangle. The desired output should look like this:

Copy
1*******
2 ***** 
3  ***  
4   *

Type the program code on the next page and then run it. If the output of your code is correct, submit it to earn points for this exercise.

Solution Video First, try to solve the question yourself. If you can't, watch the solution video:
Time of submission File type Status View/Download

Inverted Triangle

Write a program that prints an inverted triangle. Use the * symbol to draw the triangle. The desired output should look like this:

Copy
1*******
2 ***** 
3  ***  
4   *

Type the program code on the next page and then run it. If the output of your code is correct, submit it to earn points for this exercise.

Solution Video First, try to solve the question yourself. If you can't, watch the solution video:

Show descriptions

Show Editor