Conteúdo do Curso
Python Functions Tutorial
Python Functions Tutorial
Challenge: Pyramid
Tarefa
Edit a recursive function draw_pyramid
that takes an integer height
and prints a pyramid of asterisks with a height of height
to the console.
Expected Output:
Conditions:
You need to fill in the blanks in the code (___
) so that when the current height (current_height
) exceeds the specified height of the pyramid (height
), the program terminates. Otherwise, the program should continue drawing the next row of the pyramid with a recursive call to the function.
Obrigado pelo seu feedback!
Challenge: Pyramid
Tarefa
Edit a recursive function draw_pyramid
that takes an integer height
and prints a pyramid of asterisks with a height of height
to the console.
Expected Output:
Conditions:
You need to fill in the blanks in the code (___
) so that when the current height (current_height
) exceeds the specified height of the pyramid (height
), the program terminates. Otherwise, the program should continue drawing the next row of the pyramid with a recursive call to the function.
Obrigado pelo seu feedback!
Challenge: Pyramid
Tarefa
Edit a recursive function draw_pyramid
that takes an integer height
and prints a pyramid of asterisks with a height of height
to the console.
Expected Output:
Conditions:
You need to fill in the blanks in the code (___
) so that when the current height (current_height
) exceeds the specified height of the pyramid (height
), the program terminates. Otherwise, the program should continue drawing the next row of the pyramid with a recursive call to the function.
Obrigado pelo seu feedback!
Tarefa
Edit a recursive function draw_pyramid
that takes an integer height
and prints a pyramid of asterisks with a height of height
to the console.
Expected Output:
Conditions:
You need to fill in the blanks in the code (___
) so that when the current height (current_height
) exceeds the specified height of the pyramid (height
), the program terminates. Otherwise, the program should continue drawing the next row of the pyramid with a recursive call to the function.