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
How is Ms word more suitable and easier for document designing?
Answer:
MS Word is a word processing application, that built with an excellent array of features that permit the editing of text documents, with fonts, margins, borders, and page layout properties. Tables, charts, word art, shapes and pictures can be easily added to enhance the appearance and professional look of documents, as well as being able to publish documents in Portable Document Format, PDF and other file formats
Using MS Word, users an create write contract documents, resume, write-ups, fliers, invitation cards, projects, and reports from several customizable templates available in the Online Templates option of creating New Documents
The application provides support and upgrade to users that enable them make the most use of their time by having the required text document creation features in one application
Explanation: