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
Vedmedyk [2.9K]
3 years ago
10

3.17 (LAB) Ch 5 Warm up: Drawing a right triangle (Python 3) This program will output a right triangle based on user specified h

eight 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) Example output for triangle_char = % and triangle_height = 5: Enter a character: % Enter triangle height: 5 % % % % % % % % % % % % % % %
Computers and Technology
1 answer:
andre [41]3 years ago
3 0

Answer:

Find answers below

Explanation:

triangle_char = input('Enter a character: ')

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

print('')

for j in range (triangle_height):

   print((triangle_char) * (j + 1))

#below are sample output that can be gotten with predefined values

$ ./triangles.py  

Enter characters: jk

Enter height: 8

j

jj

jjj

jjjj

jjjjj

jjjjjj

jjjjjjj

jjjjjjjj

k

kk

kkk

kkkk

kkkkk

kkkkkk

kkkkkkk

kkkkkkkk

You might be interested in
Suppose that the splits at every level of quicksort are in the proportion 1 − α to α where 0 < α ≤ 1/2 is a constant. Show th
Lady_Fox [76]

Answer:

Explanation:

The minimum depth occurs for the path that always takes the smaller portion of the

split, i.e., the nodes that takes α proportion of work from the parent node. The first

node in the path(after the root) gets α proportion of the work(the size of data

processed by this node is αn), the second one get (2)

so on. The recursion bottoms

out when the size of data becomes 1. Assume the recursion ends at level h, we have

(ℎ) = 1

h = log 1/ = lg(1/)/ lg = − lg / lg

Maximum depth m is similar with minimum depth

(1 − )() = 1

m = log1− 1/ = lg(1/)/ lg(1 − ) = − lg / lg(1 − )

4 0
3 years ago
true or false, the random number generator (data analysis tool) requires you to copy paste special value in order to create stat
Vladimir79 [104]

The random number generator (data analysis tool) requires you to copy paste special value in order to create static random value(s) is a false statement.

<h3>What is the meaning of random number?</h3>

A random number is a pick of a number made seemingly at random from a certain distribution such that the distribution is reproduced when a large collection of these numbers is chosen. Such numbers must almost always be independent in order to prevent relationships between succeeding numbers.

Therefore, a hardware or software algorithm known as a random number generator produces numbers at random from a finite or infinite distribution. Pseudo-random number generators and real random number generators are the two primary varieties of random number generators.

Learn more about random number generator from

brainly.com/question/10352102
#SPJ1

8 0
11 months ago
Which part of the Word screen matches label B?
Flura [38]

The part on the Word screen that matches label B is number b because it says what part of the word matches label B. So it would obviously be label B Ribbon.



Hope this helped.


3 0
3 years ago
taking small bits of information from the internet/web and using it as my own work or to complete an assignment is plagiarism.
lana66690 [7]
Not necessarily, if you are sourcing the information you have used to come to your own conclusion then that isn't plagiarism, however if you just copy paste completely and use it as your own work then yes it is plagiarism.  <span />
7 0
3 years ago
1.The most common way by which data is input into the computer is through the______________.A.Mouse
xxMikexx [17]

Answer:

b

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • A(n) _________________________ is a character that word displays on the screen but is not visible on a printed document.
    13·1 answer
  • Web pages often have built-in connections, or links, to other documents, graphics, other web pages, or web sites. true or false?
    9·1 answer
  • Advantages and disadvantages of internet
    11·2 answers
  • Each of the outcomes listed below is a result of executing the following script except for one. Which one? CREATE ROLE ExampleRo
    6·1 answer
  • One property of light that makes it possible to record the image of an object with the camera
    5·1 answer
  • Shelby wants to move “ExpirationDate” to the top of the datasheet. What should she do?
    13·1 answer
  • Memememememmemememememememmmeememememe
    15·1 answer
  • The find_item functions uses binary search to recursively locate an item is the list, returning true if found, false otherwise.
    13·1 answer
  • Which of the following is not a benefit of introducing an e-commerce solution to an organisation?
    14·1 answer
  • Please help me with these questions​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!