Geometric shapes · 10 / 13 Exercise Medium

Triangle Rectangle String

Objective

Write a Python program that asks the user for a text x and draws a right triangle like the one in the example. The first row of the triangle is the last letter of the text and the last row is the whole text. The height of the triangle is the total number of characters of the text.

Input
triangle
Output
e
le
gle
ngle
angle
iangle
riangle
triangle

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise