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)

Answers

Answer 1

The program illustrates the use of loops;

Loops are program statements that are used to perform repetitions

The program in Python

The python program where comments are used to explain each line of the program is as follows:

#This gets input for the triangle height

triangle_height = int(input())

#This gets input for the triangle character

triangle_char = input()

#This iterates through the triangle height

for i in range(triangle_height+1):

   #This iterates through each row

   for i in range(0,i):

       #This prints each character

       print(triangle_char,end='')

   #This prints a new line

   print()

Read more about python programs at:

https://brainly.com/question/26497128

#SPJ1


Related Questions

Today's classified ads are often geared toward
medical jobs
O entry-level jobs
military jobs
O high-tech jobs

Answers

Answer:

entry-level jobs

Explanation:

Can someone help me with this!!!.

Answers

13. A fence
14. In a dictionary
15. Coin
Bonus: A coffin

what do you feel are the consequences of fake news on American society and how have digital communication tools contributed to it

Answers

Digital communication is the inter-transfer of information from one point to another. It has increased the circulation of fake news and has greatly influenced society.

What is fake news?

Fake news or yellow journalism is the spread of false and incorrect baseless information from a source. The use of social networking platforms and television have increased the spread of fake news.

It has led to negative journalism and many sensational events that have affected society in a negative manner. It has been increased to gain monetary benefits and to make some conflicts.

Therefore, fake news has negatively affected the peace of society.

Learn more about fake news here:

https://brainly.com/question/11222703

#SPJ1

How many terabytes is a 128 gigabyte SD memory card

Answers

Answer:

this would be .128 terabytes

Explanation:

This would be since for a whole terabyte you need 1000 gigabytes every 1000 gigabytes is a terabyte for example let’s say you have 5250 gigabytes you would have 5.250 terabytes that simple hope this helped!

Answer:

converting from gigabyte to terabyte, divide by 1000

therefore, 128 gigabyte = 128/1000 =0.128 terabyte

what is the protocol suit for the current internet

Answers

Answer:

TCP/IP protocol suite

Explanation:

it just is lol

Explanation: One of the most common networking protocol suites is known as Transmission Control Protocol/Internet Protocol (TCP/IP). All devices that communicate across the Internet must use the TCP/IP protocol suite. Ok bye

Which output returns the Boolean value FALSE? A. 3 B. 2 C. 1 D. 0

Answers

Answer:

D) 0

Explanation:

True - 1

False - 0

Which of the following applies to patents?
o They protect the rights of the intellectual property owner.
They represent free speech rights.
o They are pretty symbols.
o They make it OK to take other people's work.

Answers

They protect the rights of the property owner. I watch a lot of shark tank and I believe that’s right

What is the half of 3/18

Answers

Answer:

1/3

Explanation:

3/18 divided by 2 equals 1/3

hope this helps

have a good day

To perform any task in the computer, we have to instruct the computer what to do. true or false can you say there is confusion ​

Answers

Answer:

True, we have to instruct the computer what to do.

Explanation:

Identify the following as a Program, Sub-Project, or Portfolio: (2)
a) Obtaining a Masters degree. Sub Project or Program
b) Pakistan’s Nuclear Weapons Program. Program
c) Developing the database of a remote payment system. Sub Project
d) Construction of cars in an automobile company. Portfolio

Answers

Answer:

obtaining a master degree.sub project or program

The use of digital technology in medicine is constantly evolving.
Discuss the impact of digital technology on medicine including:
diagnosing patients
treating patients
storage of records.
.

Answers

Answer:

Digital technology is easy to understand once you know how to properly use it.

Explanation:

What fictional place would you most like to go to? Its your opinion!

Answers

Mount olympus

Explanation:

Because its the home of the greek gods and i feel like it would be cool to meet the gods

For which tasks is Layout view most helpful? Check all that apply.

moving an object from one section to another
showing how a report will look when printed
selecting and formatting an object
positioning an object precisely within a section
exporting a report to email or Microsoft 365

Answers

The task where the Layout view most helpful is showing how a report will look when printed.

What is the Layout view?

The Layout view is known to be a view that is said to be more of visually-oriented when compared to the Design view.

Note that the Layout view is one where each control often shows real data and as such, The task where the Layout view most helpful is showing how a report will look when printed.

Learn more about  Layout view  from

https://brainly.com/question/1327497

#SPJ1

Answer:

Its B and C

Explanation:

I just answered it. Believe it or not

2. What is the importance of ethics in emerging technologies?

Answers

Answer:

The importance of ethics in emerging technologies employ speculative data about future aspects such as items, applications, and consequences This help us make more informed moral judgments about and prescriptions for research

15 points! Introduction to Computer Science. (Picture included)
The user is told to guess a number between one and 10.
Which responses from the user could cause the program to halt with an error statement? Choose two options.

Answers

Answer:

2.5, two

Explanation:

Most likely user input should be of type int, which is whole numbers, so 2.5 (double/float) and two (string) are incorrect

Question 1 of 10
Which abbreviation is used to describe one type of long-term computer
memory?
O A. SCRAM
O B. DRAM
O C. ROM
O D. RAM

Answers

Answer:

C) ROM

Explanation:

In a computer, RAM is the short term memory. On the other side, ROM is the long term memory. Other examples of long term memory: Hard disk or SDD. Rest all of the options - SCRAM, DRAM, RAM are memory chips.

Answer:

C. ROM

Explanation:

The image was provided for explanation.

Hoped it helped.

1. How is the pronoun their used in the second sentence?
The students in Mrs. Powell 's classroom completed the service project in record time. Their
contributions to the community were broadcast on the local news,
A. To link a subject with the word(s)that describes it
B. To replace prepositions
C. To show possession
D. To replace an article like the or an

Answers

The pronoun is used in the second sentence as To link a subject with the word(s)that describes it.

What is a pronoun?

This is known to  be a word or phrase that is said to be used to replace a noun or noun phrase.

Note that in the above sentence, the pronoun " their" is used to The pronoun is used in the second sentence as To link a subject with the word(s)that describes it as it tells more about service project.

Learn more about pronoun from

https://brainly.com/question/395844

#SPJ1

Question 4: Chess Game Knight's travails. Develop a data structure similar to a binary tree. Using a standard 8 X 8 chessboard, show the knight's movements in a game. As you may know, a knight's basic move in chess is two forward steps and one sidestep. Facing in any direction and given enough turns, it can move from any square on the board to any other square. If you want to know the simplest way your knight can move from one square (or node) to another in a two-dimensional setup, you will first have to build a function like the one below. knight plays ([0,0], [1,2]) == [[0,0],[1,2]] knight plays ([0,0], [3.3]) == [[0,0],[1,2), (3,3]] knight plays ((3,3), (0,0]) == [[3.3), [1,2], [0,0]] You are required to do the following:
1. Explain how you can ensure that any move do not go off the board.
2. Choosing a search algorithm for finding the shortest path for the knight's travails.
3. Defend your choice of an appropriate search algorithm to find the best possible move from the starting square to the ending square.
4. Creating a script for a board game and a knight.
5. Create a diagrammatical tree structure, to illustrate all possible moves of the knight as children in the tree structure.

In this task, you need to understand two algorithms which can be helpful, the Breadth-First Search which utilizes the Queue data structure to find the shortest path and the Depth-First Search which can traverse a Stack data structures.​

Answers

Answer:

Answer: 64

Explanation:

How far should you sit from your computer screen?
PLS ANSWEER ASAP

6 to 12 inches

12 to 18 inches

18 to 24 inches

24 to 30 inches

Answers

im sorry but none of these THE REAL ANSWER IS 16 to 30 inches
Yes the answer is 16 to 30 inches
Non of these are the answer

Which of the following variable names best follows all of the correct naming conventions?

Answers

Answer:

B

Explanation:

The first_number would be correct.

25 POINTS! HELP ME PLEASE THANK YOU
Type the correct answer in each box. Spell all words correctly.
What attributes of color does the Luminosity blend mode affect?
You can use the Luminosity blend mode to match the brightness of the original color to the brightness of the new color.-_____
and______
are unaffected.

Answers

Answer:

What attributes of color does the luminosity blend mode affect?

Whereas the Color mode blends the colors of a layer while ignoring lightness values, the Luminosity mode blends the lightness values while ignoring the color information!

Explanation:

Use the drop-down menus to describe the Customize Ribbon dialog box,
This section lists the different tabs on the ribbon.
This component helps the user reorder tabs along the ribbon.
This section lists commands to be added to or removed from the ribbon.

Answers

Just say 4th of Independence Day

The following equations estimate the calories burned when exercising (source):
Women: Calories = ( (Age x 0.074) — (Weight x 0.05741) + (Heart Rate x 0.4472) — 20.4022 ) x Time / 4.184

Men: Calories = ( (Age x 0.2017) + (Weight x 0.09036) + (Heart Rate x 0.6309) — 55.0969 ) x Time / 4.184

Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output calories burned for women and men.

Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('Men: {:.2f} calories'.format(calories_man))

Ex: If the input is:

49
155
148
60
Then the output is:

Women: 580.94 calories
Men: 891.47 calories

Answers

Answer:

# Women: Calories = ((Age x 0.074) - (Weight x 0.05741) + (Heart Rate x 0.4472) - 20.4022) x Time / 4.184

#Men: Calories = ((Age x 0.2017) + (Weight x 0.09036) + (Heart Rate x 0.6309) - 55.0969) x Time / 4.184

#main function to gets input for age, weight, hear rate and time and print Women and Man calorie burnt

def main():

 #get user input for age, weight, hear rate and time

 age = int(input("Enter your age:"))

 weight = int(input("Enter your weight:"))  

 heartRate = int(input("Enter your heart rate:"))

 time = int(input("Enter your time:"))

 #calculate calories for women and men

 caloriesWomen = ((age * 0.074) - (weight * 0.05741) + (heartRate * 0.4472) - 20.4022) * time / 4.184

 caloriesMen = ((age * 0.2017) + (weight * 0.09036) + (heartRate * 0.6309) - 55.0969) * time / 4.184

 #print calories for women and men

 print("Women: %.2f calories"%caloriesWomen)

 print("Men: %.2f calories"%caloriesMen)

#calling main function

main()

Explanation:

1) Above is your updated program.

2) Please copy it in python file and run

3) Below is the test output for this program

Enter your age:49

Enter your weight:155

Enter your heart rate:148

Enter your time:60

Women: 580.94 calories

Men: 891.47 calories

what does command Array.GetItemcount do?

Answers

Answer:

According to https://smallbasic-publicwebsite.azurewebsites.net/docs/Array - "Gets the number of items stored in the array."

Explanation:

What are the operations in the machine cycle ?

Answers

The cycle consists of three standard steps: fetch, decode and execute.

You are a Junior IT Technician in your organisation. One of the duties is to demonstrate and explain how the computer works to the new intern staff. Discuss how you would demonstrate and explain

Answers

Recognizing the way computational modeling are utilized is just as important as employing technical knowledge about computer or laptop.

What is a demonstration?

Providing verifiable evidence to demonstrate that maybe something real or is correct.

You are a Junior IT Technician in your organization. One of the duties is to demonstrate and explain how the computer works to the new intern staff.

I'll describe how and when to install and set up computer networks, examine computer issues, and resolve technical and application issues over the phone or face to face as an IT specialist.

Based on the scale of the company for which you work, how would you represent particular maybe more knowledge and expertise? A technical IT support team is commonly separated into both first support, with both the second-line support workers answering more specialized inquiries that the first support staff couldn't handle.

More about the demonstration link is given below.

https://brainly.com/question/15070998

#SPJ1

Coding final. The code needs to be in python. See picture for information.​

Answers

Answer:

Explanation:

def running_sum():

 num = int(input("Enter a number: "))

 limit = int(input("Enter a limit: "))

 sum = num

 while sum < limit or sum == limit:

      number = int(input("Enter another number: ")

      sum+=num

 if sum==limit:

      print(sum)

 

Suppose you want to pick the most reliable data storage option possible. What would you choose?
cloud storage
solid-state drive
optical disc
USB flash drive

Answers

Answer:

USB flash drive

Explanation:

A USB flash drive can store important files and data backups, carry favorite settings or applications, run diagnostics to troubleshoot computer problems or launch an OS from a bootable USB. The drives support Microsoft Windows, Linux, MacOS, different flavors of Linux and many BIOS boot ROMs.

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:

Answers

Answer:

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()

Explanation:

I did this question mark brainiest please

what are some answers about computer languages​

Answers

Question: What is program execution?

Answer: Program execution is the process of carrying out instructions innate to the program by the computer. Before execution, the computer program is required to be loaded into the memory (RAM) of the computer.

Other Questions
5. Which theorem justifies the statement in No. 4? A. Exterior Angle Inequality theorem B. Triangle Inequality Theorem 1(Ss-Aa) C. Triangle Inequality Theorem 2(Aa-Ss) D. Triangle Inequality Theorem 3(S + S > S3) Select the three adverbs.The engineers carefully secured the dynamite in the abandoned building and moved faraway. Why do annie and her sisters glance at each other? 01. they are secretly envious of one another's nice clothes, 2. they are surprised at how old and worn out meg's dress looks. 3. they are trying to get a better look what each of them is wearing 4. they are showing that they admire meg's dress and her hairstyle, Quick please!! Tell whether a triangle with the given side lengths is a right triangle. 14 cm, 23 cm, and 25 cm What is it called when a speciescompletely dies off?Helllllppppp How many solutions does this system have?x-3y=4-2x+6y=3O oneO twoO an infinite numberOno solution Place the order of digestion in order. __ water is reabsorbed from indigestible food. __ emulsification takes place with the help of bile. __ feces is stored in the rectum and later released via the anus.__ hydrochloric acid and pepsin helps to create chyme.__ chyme enters the small intestine.__ food is turned into bolus. Why should boaters slow down while passing recreational fishing boats?. 3 If f(x) = x2 and g(x) = x + 6, find g(f(0)). A. -6 B. 6 C. 12 D. 36 Three trains are made of identical train cars, so each car has the same number of seats. The first train has 418 seats, the second train has 456 seats, and the third train has 494 seats. How many cars are in each train if no train has more than 25 seats I'll give 100 points Devon and his friends bought strawberry wafers for $3 per packet and chocolate wafers for $1 per packet at a carnival. They spent a total of $30 to buy a total of 22 packets of wafers of the two varieties.Part A: Write a system of equations that can be solved to find the number of packets of strawberry wafers and the number of packets of chocolate wafers that Devon and his friends bought at the carnival. Define the variables used in the equations. Part B: How many packets of chocolate wafers and strawberry wafers did they buy? Explain how you got the answer and why you selected a particular method to get the answer. If a 714-mile trip takes 17 hours, the average speed is? who really benefits from globalization? write a short paragraph arguing who benefits from globalization *13 POINTS* 30 points felicity is on a field trip to the local zoo. she notices an old watchtower. the sun is directly behind this watchtower, drawing the attention towards the borders and outlying features of the watchtower. what effect is felicity observing? felicity is observing the _____ effect. find the area of the figure. use 3.14 for pi.a 133.5b 188.5c 149.25d 94.25 Choose the correct code assignment for the following scenario: 45-year-old patient seen for a lump in the upper outer quadrant of the right breast. Patient had breast cancer 10 years ago.A. Z85.3B. N63.11, Z85.3C. C50.919, Z85.3D. Z80.3 Who were the first men and women created on the earth ? factor the expression using the gcf 25+50 Which expression is another way to write 10,000?10 10 1010 10 10 1010 10 10 10 1010 10 10 10 10 10 Choose the correct past participle for the following verb: revenirO reveniO revenuO reven