subject

Write a program that, prints a ‘pine tree’ consisting of triangles of increasing sizes, filled with a character (‘*’ or ’+’ or ‘$’ etc). your program should consist of three functions: 1. a function print_shifted_triangle(n, m, symbol). it prints an n-line triangle, filled with symbol characters, shifted m spaces from the left margin. for example, if we call print_shifted_triangle(3, 4, `+`), the expected output is: + +++ 2. a function print_pine_tree(n, symbol). it prints a sequence of n triangles of increasing sizes (the smallest triangle is a 2-line triangle), which form the shape of a pine tree. the triangles are filled with the symbol character. for example, if we call print_pine_tree(3, `#`), the expected output is: # ### # ### # ### 3. a main() function that interacts with the user to read the number of triangles in the tree and the character filling the tree.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 24.06.2019 06:00
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
You know the right answer?
Write a program that, prints a ‘pine tree’ consisting of triangles of increasing sizes, filled with...
Questions
question
History, 19.08.2019 16:30
question
Mathematics, 19.08.2019 16:30