1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kondaur [170]
3 years ago
9

This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. (1) The given

program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangle_char character. (1 pt) (2) Modify the program to use a loop to output a right triangle of height triangle_height. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangle_height. Output a space after each user-specified character, including a line's last user-specified character. (2 pts)
Computers and Technology
1 answer:
Arturiano [62]3 years ago
4 0

Answer:

See explaination

Explanation:

triangle_char = input('Enter a character:\n')

triangle_height = int(input('Enter triangle height:\n'))

print('')

for i in range(triangle_height):

for j in range(i+1):

print(triangle_char, end = " ")

print()

You might be interested in
Program 3.Study the code carefully and write out the line where there is error, debug it and write out the correct code
stich3 [128]

Answer:

Several errors:

  • 0 where ( ) was intended (probably OCR problem)
  • space between As and Double
  • Single quote in stead of double quote in text string
  • $ in stead of & near Math.sqrt
  • missing spaces around "is" for proper formatting

5 0
3 years ago
What kind of negative social impact has wireless communications had on today's society?
Zarrin [17]
Kind of negative social impact has had today is debates on social networking and dating and wireless communications are destroying kids from ages 12-16 these 21st century devices are frying are worlds society.
5 0
3 years ago
Read 2 more answers
​Lara is the chief editor of "Laughter and Life," an online magazine. Lara has assigned Jenny the task of redesigning the magazi
Zarrin [17]

Answer:

The "A" option is correct.

Explanation:

For CSS flexbox layout, the property "align-content" requires that the space in the flexbox is more than enough to show the items. In this case, to distribute evenly the items and show the first and last items aligned with the start and end of the main axis, the only suitable option is "space-between". This option leaves no space at the start or at the end of the flexbox, distributing the remaining space between the elements into the flexbox.

7 0
3 years ago
Which action does not happen in each iteration of the repeat loop in the
iren2701 [21]

B. The number of sharks decreases. Explanation: hope it's help i learned about it and you too

7 0
2 years ago
What is the correct keyboard shortcut to cut a cell value
vladimir2022 [97]

Answer:

Cntrl+X

Explanation:

Do it on your computer

4 0
2 years ago
Other questions:
  • Which of the following would be considered a strong password?
    5·2 answers
  • What phrase best describes the overall structure of the<br> passage
    9·1 answer
  • Given the security levels TOP SECRET, SECRET, CONFIDENTIAL, and UNCLASSIFIED (ordered from highest to lowest), and the categorie
    13·1 answer
  • Write a recursive method called lengthOfLongestSubsequence(a, b) that calculates the length of the longest common subsequence (l
    15·1 answer
  • Using complete sentences post a detailed response to the following.
    10·1 answer
  • Your personal opinion about what a "successful" console in the future will need to include to sell well. How have the changes in
    12·1 answer
  • What can you think of as a box or container that holds a value and has a label?
    11·2 answers
  • An agile team has which two characteristics? (choose two. ).
    10·1 answer
  • Write A Code In Python
    8·2 answers
  • Which are ways that technology keeps you hooked?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!