I need help creating a symmetric histogram. The program should ask the user to enter the number of bars to print and the character to use to draw the bars. The count of characters in the bar needs to be displayed on the right-side of each bar. You must use a nested loop to display the output.

I Need Help Creating A Symmetric Histogram. The Program Should Ask The User To Enter The Number Of Bars

Answers

Answer 1

Answer:

The program in Python is as follows:

import math

bars = int(input("Bars: "))

symbol = input("Character: ")

current = 1

while current < bars * 2:

   if current <= bars:

       num = current

       for i in range(num):

           print(symbol,end="")

       print(current)

   else:

       num = abs(bars * 2 - current);

       for i in range(num):

           print(symbol,end="")

       print(i+1)

   current+=1

   

Explanation:

This imports the math module

import math

This gets input for the number of bars

bars = int(input("Bars: "))

This gets input for the number of characters

symbol = input("Character: ")

This sets the current element to 1

current = 1

The following iteration is repeated until printing ends

while current < bars * 2:

The following checks for printing in ascending order

   if current <= bars:

       num = current

The following loop prints the characters in ascending order

       for i in range(num):

           print(symbol,end="")

This prints the number of characters

       print(current)

The following checks for printing in descending order

   else:

Calculate the number of iteration left

       num = abs(bars * 2 - current);

The following loop prints the characters in descending order

       for i in range(num):

           print(symbol,end="")

This prints the number of characters

       print(i+1)

   current+=1

 


Related Questions

is computers takes lots of time to do any mathematical calculations.​

Answers

Answer:

I think the answer is a computer take lost of time to do any mathematical calculations because problem in the book or questions.

Hope this helps you ^^

what allows an individual or company to share a post with an audience however they are designed to be used with mobile devices and limit the size of posts

Answers

Answer:

E-mail

Explanation:

The sending of messages via the Internet is known as e-mail. It is one of the most often utilised functionalities for sending text, files, pictures, and other attachments across a communications network.

A podcast lets a person or corporation to share articles with an audience, but it is geared for usage on mobile devices and has a capacity restriction.

write the step by approach to re saving a document using the save as option

Answers

Press save as and then choose your location to save it and then click save

Anyone know how to make website (PROFESSIONAL)

Answers

Answer:I know how to make a professional website

Explanation:

Express your opinion on whether a successful business analyst can be a good programmer. support your answers with reason

Answers

I think that a successful business analyst could be a good programmer because if they had the write training and experience they could learn about that field of work and become good at programming

What is the role of memory in a computer​

Answers

Answer:

Computer random access memory (RAM) is one of the most important components in determining your system's performance. RAM gives applications a place to store and access data on a short-term basis. It stores the information your computer is actively using so that it can be accessed quickly.

How would you approach a friend that you suspect is addicted to technology?

Answers

Ask them to go out on a picnic or something that doesn’t involve technology and if they bring up excuses, tell them that it’s not healthy to be on their phones or other devices all the time.

You would approach a friend that you suspect is addicted to technology in numerous ways. Some of them are as follows:

Guide that individual towards tour and travel which can not include technology. Advise him to give tips on meditation and its benefits.Plan a regular schedule for exercise. Try to give the advantages of being familiar with family members.

What are the disadvantages of technology?

The disadvantages of technologies are as follows:

It stimulates social isolation and loneliness.Complete waste of time.It builds negative impacts on young students. Gradual degradation of mental health and memory.

According to the context of this question, technology addiction becomes normal in the present scenario. So, in order to prevent yourself and your family members from these traps follow some well-determined and strict routine and try to spend time with the family members, games that do not involve technology, meditation, exercise, etc.

Therefore, you would approach a friend that you suspect is addicted to technology in numerous ways. Some of them are well mentioned above.

To learn more about Technology addiction, refer to the link:

https://brainly.com/question/9552314

#SPJ5

In large organizations, there is a formal business function that includes developing an information policy, planning for data, overseeing logical database design and data dictionary development, and monitoring how information systems specialists and end user groups use data. __________ is responsible for information policy, as well as for data planning, data dictionary development, and monitoring data usage in the firm.

Answers

Answer:

Data administration.

Explanation:

Data management is a type of infrastructure service that avails businesses (companies) the ability to store and manage corporate data while providing capabilities for analyzing these data.

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Hence, a database management system (DBMS) is a system that enables an organization or business firm to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data.

Data administration is a strategic process that is typically responsible for establishing information policy, data planning, data dictionary development, and monitoring data usage in the firm.

A host is on the 192.168.146.0 network that has a subnet mask of 255.255.255.0. The binary value of the host portion is 11010101. What is the decimal value of the host portion of the address?

Answers

Answer:

213

Explanation:

The given parameters are;

The network on which the host is on = 192.168.146.0

The subnet mast = 255.255.255.0

The binary value of the host portion = 11010101

To convert the binary value to decimal value, we proceed by multiplying each of the digits of the binary value by the corresponding power of 2, from the left to right, starting from a power of 0, and sum the result, as follows;

(11010101)₂ = (1×2⁷ + 1×2⁶ + 0×2⁵ + 1×2⁴ + 0×2³ + 1×2² + 0×2¹ + 1×2⁰)₁₀

1×2⁷+1×2⁶+0×2⁵+1×2⁴+0×2³+1×2²+0×2¹+1×2⁰= 128+64+0+16+4+1 = 213

∴ (11010101)₂ = (213)₁₀

The decimal value of 11010101 is 213.

Assume there are two variables, k and m, each already assigned a positive integer value and further assume that k's value is smaller than m's. Write the code necessary to compute the number of pertect squares between k and m. (A perfect square is an integer like 9, 16, 25, 36 that is equal to the square ot another integer (in this case 393, 4*4, 5*5, 6*6 respectively). Assign the number you compute to the variable q. For example, if k and m nad the values 10 and 40 respectively, you would assign 3 to q because between 10 and 40 there are these perfect squares: 16, 25, and 36.

Answers

Answer:

Lets us take k, m = 10, 40

q = 0

i = k

while i <= m:

   if int(i*0.5)*2 == i:

       q += 1

   i += 1

Distinguish between afax and a telephone call (5points)​

Answers

Answer:
A fax is an exact copy of a document made by electronic scanning where as a telephone call is a communication or conversation via a telephone

Shelby wants to move “ExpirationDate” to the top of the datasheet. What should she do?

Answers

Select row for "ExpirationDate", click the mouse and drag the field until the blue line appears above "Scent," and release the mouse button.

describe how it is necessary to design documents, files, forms/inputs, reports/outputs and validation​

Answers

Answer:

Explanation:

Good organization, complete information and clear writing are the most effective ways to design a document.

I hope this helps

Which kind of image is indispensable and needs added text to go with it?

Answers

Answer:

A chart and a graph

Explanation:

outline the steps involved in signing into your account​

Answers

You put in your username or email and then you put in your password! It’s as simple as that :D

What is office technology?​

Answers

Answer:

Explanation:

Office Technology is the study of a wide range of subjects related to careers in the modern office of today. This program provides the training necessary to perform successfully in the many and varied clerical, secretarial, and office administrative positions.

The number of swappings needed to sort the number 8, 22, 7, 9, 31 in ascending order, using bubble sort is

Answers

Answer:

3

Explanation:

swap the 7 with the 22

swap the 7 with the 8

swap the 9 with the 22

An online retailer is looking to implement an enterprise platform. Which component of the enterprise platform will help the company capture curate and consumer customer information?

Answers

Answer:

Data and Insights

Explanation:

In an enterprise platform, the data and insights are considered as one of the important aspect of any enterprise. It helps in better understanding of the customer so that the enterprise successfully offers best services to the customers.

Data are basically the information that enterprise can gather from the customers and insights are defined by gaining knowledge by analyzing these data so that the company can provide best customer service and it also helps them to capture curate as well as consumer information.

Thus the answer is 'data and insights'.

what is the example of HTML?​

Answers

Answer:

For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data table

What is thesql command to list the total sales by customer , month , and product, with subtotals by customer and by month and a grand total for all product sales

Answers

Answer:

The answer is below

Explanation:

The the sql command to list the total sales by customer , month , and product, with subtotals by customer and by month and a grand total for all product sales is:

SELECT S.CUS_CODE, T.TM_MONTH, S.P_CODE,

SUM(S.SALE_UNITS*S.SALE_PRICE) AS "TOTSALES"

FROM DWDAYSALESFACT AS S INNER JOIN DWTIME AS T ON S.TM_ID =

T.TM_ID

GROUP BY S.CUS_CODE,T.TM_MONTH,S.P_CODE WITH ROLLUP;

An end-user license agreement protects _____.

Answers

End User License Agreements are important for protecting the rights of the business owner/licensor and critical for setting the rules of use and managing the expectations of the end-user.

Answer: both the owner and the purchaser of the software

Explanation:

Who said the following, and what does it mean? Conceit, more rich in matter than in words, Brags of his substance, not of ornament. They are but beggars that can count their worth; But my true love is grown to such excess I cannot sum up half my sum of wealth. (II. vi. 33-37) Juliet; she is saying that she doesn't care about money. Lady Capulet; she is reminding Juliet how lucky she is to be marrying Paris. Romeo; he is saying that true understanding has made him realize how very lucky he is to be marrying Juliet. Juliet; she is saying that true understanding is enriched by reality and worth more than outward appearances.

Answers

Answer: Juliet; she is saying that true understanding is enriched by reality and worth more than outward appearances.

Explanation:

Juliet was talking to Romeo in this instance and trying to tell him that it was easy to speak words but that for those words to be properly understood, action must follow them.

In other words she was telling him that to truly understand something, actions must back it up. She then goes on to say to him that the love she has is so much that it has made her feel more wealthy.

donde veo haikyuu en español sin lag ni virus :C (la segunda, tercera y cuarta temporada)

Answers

Answer:

keep in English language

Explanation:

keep in English

How can computer be beneficial in agriculture and tourism​

Answers

The production capacity in farming and animal husbandry has increase due to use of computer in agriculture field . There are less losses due to work are monitored by computer. By using computer in traditional field like agricultural field we can increase the productivity and minimize the error happen.

You are concerned that if a private key is lost, all documents encrypted using your private key will be inaccessible. Which service should you use to solve this problem

Answers

Answer:

Key escrow.

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In Cyber security, encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext.

Typically, an information or data that has been encrypted can only be accessed and deciphered by an authorized user.

Hence, if a private key is lost, all documents encrypted using that private key will be inaccessible to the users. Thus, the service that can be used to solve this problem is a key escrow because the cryptographic (private) keys kept in an escrow system are protected and would not be released to anyone other than the original user (owner).

A key escrow can be defined as a data security method of storing very essential cryptographic keys.

Simply stated, key escrow involves a user entrusting his or her cryptographic key to a third party for storage.

As a standard, each cryptographic key stored or kept in an escrow system are directly linked to the respective users and are encrypted in order to prevent breach, theft or unauthorized access.

Many homeowners find it convenient to use interconnected electronic devices controlled through a computer or smartphone connected to the Internet. However, these interconnected devices can lead to some issues. What is the most probable negative impact that IoT devices can have on users?

Answers

Answer:

The most probable negative impact that IoT devices can have on users is the increase vulnerability of information technology cybersecurity, being that access can be gained into the system through another device connected to an IoT device from which it is theoretically possible to launch malicious computer codes, using both old and present day hacking technologies, due to the different securities, categories and systems of devices connected to the IoT

Explanation:

The negative impacts of Internet of Things IoT devices on users are

1) Loss of privacy 2) Network complexity increase 3) Increase in the dependence on technology 4) Increased unemployment, 5) Lack of compatibility between devices

What is the positional weigh of the digit 7 in the octal number 7642 ?​

Answers

Answer:

111 is the answer..i hope it helps

Gabriel's sister called him about a message that suddenly appeared on her screen that says her software license has expired and she must immediately pay $500 to have it renewed before control of the computer will be returned to her. What type of malware has infected her computer

Answers

Answer:

Blocking ransomware

Explanation:

A ransomware is a malware that acts by encrypting the files of a victim after which the attacker demands for a ransom payment to be made by the victim before access is restored through the provision of a key to decrypt the encrypted files

There are different types of ransomware such as blockers, wipers and cryptors

A blocker ransomware is one that blocks access to the files stored on a computer or device by encrypting them and usually displaying a demand for payment message that comes up in front of the all opened windows

How do you connect asp.Net mvc web application in visual studio 2013 to a database created in mysql query browser

Answers

Solution :

Asp.Net is a programming language of Microsoft. It stands for  Active Server Pages. It was developed by the giant, Microsoft which provides and helps the programmers to build a dynamic web sites, services and applications.

Using the asp.Net we can create a web application which provides interface to the existing database.

Creating an ASP.NET web application :

-- We create a new project in the Visual Studio in the same solution or the new solution and then select asp.NET web app template.

-- Name this project as ContosoSite.

-- Click OK.

-- Now in the project window of a new asp.Net project window, we select the MVC template.

-- Clear the Host in Cloud option as of now as we can deploy the application to the cloud later on.

-- Click ok for creating the application.

A finite set of values along with set of rules for permissible operations is called ______


Data type

Class

Methods

Answers

Answer(data type) is your answer

Data type is the correct answer
Other Questions
In a study involving a cell-free translation system from coli, the polyribonucleotide AUGUUUUUUUUUUUU directs the synthesis of the oligopeptide fMet-Phe-Phe-Phe-Phe. In the presence of a new class of translation-targeting antibiotics that bind to the large ribosomal subunit, the ribosomal complex forms, the initiator tRNA binds the mRNA, the second tRNA enters the A site of the ribosome, but no peptide bonds form. Which of the following is a likely function of these new antibiotics?a. Blocks peptidyl transferase activity b. Inhibits tRNA aminoacyl synthetase function c. Inhibits ribosomal translocation along the mRNA d. Prevents anticodon base-pairing with the codon e. Blocks binding of the Shine-Dalgarno box to the rRNA Which of the following are the three areas of the tundra biome? (Choose all that apply.)ArcticAsianAntarcticalpine I want a correct answer you can take your time. If I was born on December 24, two thousand and four and my classmate was born on April 9, two thousand and six, how many months, years and days are we apart? Different between Producers and Decomposers Ive never really understood 8th-9th grade volume, could use some help if you feel unsafe in your environment it cannot affect your self concept Aarti, a museum employee, has created a table in access titled Roman Achitecture. She has included a field that links users images of buildings. (A) What is the domain of K(B) What is the range of K Write a program which will create an array of size 10. Fill the array with random numbers from 0 - 100. (use a loop and random number generator rand) Once you are done with this, you will then write a loop which will go through each element of the array, display the contents of that element and tell if that element is an even number or odd number. Go through all the elements again and this time tell me how many are even and odd. Its cleaning day! Whos doing what? Write the correct answer to each question, based on the photos.Begin each sentence with the name of the person who is doing the chore.Continue each sentence with the verb conjugated in the present progressive.Use a direct object pronoun in each of your answers.Be sure to start your sentences with a capital letter and end them with a period.TIP: You can place the direct object pronoun either before the conjugated verb or attached to the end of the present participle. If you attach the pronoun, remember to add an accent mark to the present participle (-ndo- / -indo-).ModeloQuin est pasando la aspiradora?Alex est pasndola. / Alex la est pasando.1. Quin est planchando la ropa?enter answer2. Quines estn baando al perro?enter answer3. Quin est guardando los platos?enter answer4. Quin est barriendo el piso?enter answer5. Quin est limpiando la cocina?enter answer Un litro de leche de bfala equivale a 1.7 litros de leche de vaca. si tengo 27 litros de leche de bfalo, a cuantos litros de leche de vaca equivaldra? Area of rectangle or triangle Instructions: Find the missing side of the triangle.1216X= Plz help! Ill be giving extra points Which of the following would be an appropriate topic for a personal essay?A. A technical discussion of the proper way to draw with charcoalpencilsB. A history of the development of charcoal artC. An account of your personal difficulty and eventual triumph inlearning to draw with charcoalD. All of the above There is a bag filled with 5 blue, 4 red and 3 green marbles.A marble is taken at random from the bag, the colour is noted and then it is replaced.Another marble is taken at random.What is the probability of getting 2 different colours? Which best describes the communication strategy of "being flexible"?A. Avoiding a focus on "right vs. wrong" and listening insteadB. Encouraging others to express genuine thoughts and feelingsC. Negotiating needs and meeting someone else halfwayD. Repeating back what you've been told to confirm the message Type of symbiosis Suppose friendly ants fed on sugary droplets excreted from a caterpillar, but did nothing to help the caterpillar. Assuming that taking the sugar does not hurt the caterpillar, what type of symbiotic relationship is this 3 facts about the Achievement Gap; Select all the words that are feminine.llenacaroeconmicacerradosaladoabierta