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
Natasha2012 [34]
4 years ago
13

Write a program that prints the block letter “B” in a 7x7 grid of stars like this:

Computers and Technology
1 answer:
makkiz [27]4 years ago
6 0

Answer:

  1. output = ""
  2. for i in range(7):
  3.    if(i % 3 == 0):
  4.        for i in range(5):
  5.            output+= "*"
  6.        output += "\n"
  7.    else:
  8.        for i in range(2):
  9.            output += "* "
  10.        output += "\n"
  11. print(output)

Explanation:

The solution code is written in Python 3.

Firstly, create a output variable that holds an empty string (Line 1).

Create an outer loop that will loop over 7 times to print seven rows of stars (Line 2). In row 0, 3 and 6 (which are divisible by 3) will accumulate up to 5 stars using an inner loop (Line 4-5) whereas the rest of the row will only print two stars with each start followed by a single space (Line 8-9) using another inner loop.

At last, print the output (Line 12).  

You might be interested in
If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the capti
elena-s [515]

Answer:

elipses

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the windows standard in this situation would be to place an ellipses at the end of the caption. This is because in the English language an ellipses (...)  usually indicates an intentional omission of a word or sentence, which in computer science is used to give the user an indication that it requires further user input.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
4 years ago
PLEASE HELP I WILL GIVE BRAINLIEST AND 100 POINTS IF U ANSWER COMPLETELY WITHIN 30 MIN
icang [17]

Answer:

Explanation:

be themselves and that is more than enough to be beautiful. Lastly, I would organize the colorson each photo to be organized to make it look like flowers. That would add a nice touch to seemlike the unorganized pictures are actually organized.

7 0
3 years ago
April 107 90 29 31 66 0.344
Misha Larkins [42]

Answer:

Check the explanation

Explanation:

with open('stats. txt', 'r') as   # open the file in read mode

   list1 = []   # initialize an empty list

   for i in  . readlines ():  # read every line of file

       for j in i. split ():  # split each line by a space and append it to the list1

           list1. append (j)

   months = [] # initialize required lists to empty list

plate_apperence = []

at_bats = []

runs = []

hits = []

total_bats = []

for i in range(0, len(list1)-1, 7): # use a for loop and give parameters as start,stop and step count

months. append(list1[i]) # append list1 elements to required lists

plate_apperence. append(int(list1[i+1]))

at_bats. append(int(list1[i+2]))

runs. append(int(list1[i+3]))

hits. append(int(list1[i+4]))

total_bats. append(int(list1[i+5]))

for i in range(len(months)): # for each element in months

print("Player's Average Batting and slugging percent for the month ", months[i], " is as shown below")

print("{:.2f}".format(hits[i]/at_bats[i])) # calculate Average batting and slugging percent and print them

print("{:.2f}". format(total_bats[i]/at_bats[i]))

print("\n")

Kindly check the attached images below to get the Code Screenshot and Code Output.

3 0
3 years ago
Jim has listed stages of the product life cycle in his presentation. Which slide element can Jim use to make the items in the li
Sergeeva-Olga [200]
I believe the correct answer is C.
7 0
3 years ago
Read 2 more answers
Need help with these
AnnyKZ [126]

Answer:

1. D

2. B

3. D

Explanation:

vnasgbaenVmad7kDg Zg

8 0
3 years ago
Other questions:
  • Hi can yall tell me if my answers r right or wrong and if they are can u tell which ones r correct. And plz explain only if you
    14·1 answer
  • What is the prediction in technology for the future?
    6·1 answer
  • In 2004, ICQ users were enticed by a sales message from a supposed anti-virus vendor. On the vendor's site, a small program call
    15·1 answer
  • g What field in the IPv4 datagram header can be used to ensure that a packet is forwarded through no more than N routers? When a
    10·1 answer
  • When you move a paragraph in a document that includes text with a footnote, what happens to the footnote reference?
    7·2 answers
  • Alessandro wants to use his desktop computer to video chat with his mother. What hardware does he need to accomplish this?
    9·1 answer
  • If a menu-driven program uses a loop to redisplay the menu after a selected operation has been performed, the menu should probab
    14·1 answer
  • 6. What type of application is designed for making slide shows?​
    12·2 answers
  • Write a program that removes all non-alpha characters from the given input. Ex: If the input is: -Hello, 1 world$! the output is
    13·1 answer
  • Select the correct answer.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!