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]
3 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]3 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
When one method calls another, which of the following statements are true?
jonny [76]

Answer:

I. The class methods and instance methods of one class may call the public class methods of another class using dot notation and referencing the name of the other class.

Explanation:

Private methods are being accessed from only within the class or scope specified. No other means of accessibility is possible, and even through inheritance. And instance methods can never call without using dot notation, any of the class method of the same class. Hence second and third options are not correct. And the class method and the instance methods of one class may call the public class methods of another class using the dot notation and referencing the name of the other class. Hence, the correct option is the first one.

3 0
3 years ago
You are considering implementing a backup scheme for a server. After researching options, you decide on a method that does not r
Alecsey [184]

Answer:

C. A cold site is a leased facility that contains only electrical and communications wiring, air conditioning, plumbing, and raised flooring. No communications equipment, networking hardware, or computers are installed at a cold site until it is necessary to bring the site to full operation.

Explanation:

3 0
3 years ago
Health informatics is an interdisciplinary field which incorporates theory and methodology from fields in computer science. True
noname [10]

Health informatics is an interdisciplinary field which incorporates theory and methodology from fields in computer science is True.

True

<u>Explanation:</u>

To capture patient health information they used interdisciplinary field which is consists patient information and they diseases and cure treatment taken for that patient. All information is store in digital formatted.

The patient information is stored such as health informatics, nurse and doctor treatment, health treatment, medicine details, clinics information.

Health informatics are used to do further analysis on patient health. Doctors are using this information for their further treatment for their patient also.

Information are also can be used as IOT information so that patient information are readily available.

3 0
4 years ago
Which of the following expressions would you use to test if a char variable named choice is equal to "y" or "Y"? a. choice.tolow
11111nata11111 [884]

Answer:

choice.tolower == "y"

Explanation:

The tolower method is a string method in c# that converts all characters in a string to lowercase characters(if they are not already lowercase letters) except special symbols which remain the same example "#" symbol.

The tolower method does not take any arguments, therefore to use it, we simply chain it to our string variable(dot notation) and use a comparison operator "==" that evaluates to true or false based on whether the values returned on both sides are equal.

6 0
3 years ago
What is stands for BCPL explain ?​
krek1111 [17]
Answer: Basic Combined Programming Language

Explanation: it is a procedural, imperative, and structured programming language, originally intended for writing compilers for other languages.
8 0
3 years ago
Other questions:
  • Identify the correct software or hardware applications in the passage below
    10·1 answer
  • A base class named Garden contains a private field width and a property public int Width that contains get and set accessors. A
    11·1 answer
  • Which of the following is a school-to-work program that provides the student with paid employment, school credit, and school gra
    7·2 answers
  • List two ways that search engines and electronic databases are similar and three ways that search engines and electronic databas
    13·2 answers
  • Our readings so far explored computer hardware and software, in particular operating systems and application software. There are
    11·1 answer
  • What is an 8086 microprocessor used for
    13·1 answer
  • ____ occurs when two nodes simultaneously check a channel, determine that it is free, and begin to transmit.
    9·1 answer
  • SNMP is a protocol used to query hosts, servers, and devices about performance or health status data. This protocol has long bee
    7·1 answer
  • What are the nuclear codes?
    14·1 answer
  • Task 04
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!