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
Karo-lina-s [1.5K]
2 years ago
6

(1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle t

hat 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:

Computers and Technology
1 answer:
zloy xaker [14]2 years ago
6 0

Answer:

Following are the code to this question can be described as follows:

c= input('Input triangle_char: ') #defining variable c that input character value  

length = int(input('Enter triangle_height: ')) # Enter total height of triangle

for i in range(length): # loop for column values

   for j in range(i+1): #loop to print row values

       print(c,end=' ') #print value  

   print()# for new line

Output:

please find the attachment.

Explanation:

In the above python code, two variable "c and length" variables are declared, in variable c is used to input char variable value, in the next line, length variable is defined, that accepts total height from the user.

  • In the next line, two for loop is declared, it uses as nested looping, in which the outer loop prints column values and inner the loop is used to prints rows.
  • To prints all the value the print method is used, which prints the user input character triangle.

You might be interested in
The tag that describes the content of the web page is ________________
makkiz [27]

Answer:

<body>

Explanation:

the content of the web page must be body.

4 0
3 years ago
What do you think about net neutrality??
Tomtit [17]
I think net neutrality should be kept! Removing net neutrality is unfair for all those who use the Internet! I think life would change is net neutrality did. Certain websites (a lot!) would slow down and cause a lot of people inconvenience, and I bet we'd have to pay more to use some sites!!!

NET NEUTRALITY SHOULD BE PRESERVED!!!!
6 0
3 years ago
Read 2 more answers
Intro to cs 3.7 edhesive g=float(input("Enter your English test grade:")) if(g&lt;=64): print("F") if (g&gt;=65 and g&lt;69): pr
qwelly [4]

Answer:

The correct code for this question:

g=float(input("Enter your English test grade:")) #take input from user.

#check conditions

if (g>=100 and g<=90):

print ("A")

#g greater then equal to 100 and less then equal to 90.

if (g>=89 and g<=80):

print("B")

#g greater then equal to 89 and less then equal to 80.

if (g>=79 and g<=70):

print("C")

#g greater then equal to 79 and less then equal to 70.

if (g>=69 and g<=65):

print("D")

#g greater then equal to 69 and less then equal to 69.

if(g<=64):

print("F")

#g less then equal to 64.

else:

print ("Not a grade")

#not a grade or fail.

Explanation:

In this program, we use to take a value from the user and check the value from the various conditions. To check all the condition we use if-else statement and AND operator that check to the range to together.

If -else is a conditional operator. In that, If block is used to check the true part and else part takes false value, and AND is a logical operator that check the two range together  

5 0
2 years ago
Which decimal number is equivalent to this hexadecimal number?<br> F8
emmainna [20.7K]

Explanation: The numbers in a hex are the same as decimal numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The big difference between a hex and a decimal is that a hex also contains letters. These letters are: A, B, C, D, E, F. A hex number can be represented using a subscript of 16.

3 0
3 years ago
Read 2 more answers
Como hago para poner brainly en español???
Lelu [443]
Mentely es eso espero q te ayude :)
4 0
3 years ago
Read 2 more answers
Other questions:
  • For some brand-name computers, the hard drive contains a partition that can be used to reinstall windows. what is the name for t
    6·1 answer
  • T FROW PYCW GCYN TA T ODYHP WQROW TW<br><br> Someone decode pls
    14·1 answer
  • What are two major techniques involved in green computing
    14·1 answer
  • Problem 5. (Greatest Common Divisor) Write a program gcd.py that accepts p (int) and q (int) as command-line arguments, and writ
    13·1 answer
  • How would you define media literacy?
    12·1 answer
  • Complete the below method, isPalindrome(), that takes in a String and returns a boolean. The boolean should be true if the Strin
    7·1 answer
  • PLZ ANSWER THESE QUESTIONS FOR 30 POINTS AND BRAINLIEST!
    9·1 answer
  • What does the "zoom tool" do in Photoshop?
    15·2 answers
  • The ______ engine compares your entry against its database and returns a list of hits or sites that contain the keywords. (hint:
    8·1 answer
  • What feature preserves your open apps and data, but allows another user to log in to his or her own session of the same computer
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!