Computers and Technology

LAB: Warm up: Drawing a right triangle 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) Example output for triangle_char = % and triangle_height = 5: Enter a character: Enter triangle height: 5 273334.1408726 LAB ACTIVITY 16.6.1: LAB: Warm up: Drawing a right triangle 0/3 main. py Load default template... 1 triangle_char - input('Enter a character:\n') 2 triangle_height = int(input('Enter triangle height:\n')) 3 print('') 4 5 print ('*') 6 print ("**') 7 print ("***') 8

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, alyssatamayo641
Speed is how fast an object moves a certain distance within a length of time. how is speed calculated? a) distance/time b) time/distance c) velocity/time d) distance x time
Answers: 1
image
Computers and Technology, 22.06.2019 13:00, ajayfurlow
Which option should u select to ignore all tracked changes in a document
Answers: 1
image
Computers and Technology, 22.06.2019 13:30, 21megoplin
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
image
Computers and Technology, 23.06.2019 23:30, huangjianhe135
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
Answers: 1
Do you know the correct answer?
LAB: Warm up: Drawing a right triangle This program will output a right triangle based on user speci...

Questions in other subjects: