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]
3 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]3 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
Which tasks can a user accomplish by using the Find and Replace feature of Word? Check all that apply.
sveticcg [70]

Answer:

B,C,E your welcome

Explanation: i just took the test

3 0
2 years ago
21
n200080 [17]

Answer:

slide sorter view

Explanation:

Explanation: while you can use 3/4 of these options to reorder slides, it is more common to use slide sorter view.

8 0
2 years ago
Open Comments.java and write a class that uses the command window to display the following statement about comments:
riadik2000 [5.3K]

Answer:

Answers to the code are given below with appropriate guidelines on definitions and how to properly run the code

Explanation:

//3 ways to comment are as follows:

//1. This is a one line comment.

/**

* 2. This is a documentation comment.

* @author Your name here

*

*/

/*

*3. This is a multiple line comment

* */

public class Comments {

//Driver method

public static void main(String[]args) {

/*

* All the text written inside the

* sysout method will be displayed on

* to the command prompt/console*/

System.out.println("Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("3 ways to add comments in JAVA are as follows: \n");

System.out.println("1. One line comment can be written as:\n//Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("2. MultiLine comment can be written as:\n/* Program comments are nonexecuting \n * statements you add to a file for the \n * purpose of documentation.\n */\n");

System.out.println("3. Documentation comment can be written as follows:\n/**\n * Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n **/");

}

}

Steps to Run:

1. Make file named Comments.java, and copy paste the above code.

2. Open command prompt and then go to the directory where you have saved the above created file.

3. The before running compile the code by using command

javac Comments.java

4. Now, run the code by the below command

java Comments.

Congrats your assignment is done!!

8 0
3 years ago
jenny wants to create a resume after a two year gap. what should she consider? jenny has a two year gap between her last two job
Lunna [17]

Answer:

functional

Explanation:

Suppose you are pivoting to a certain new company, and you find that your experience is not suited. You are certainly going to highlight your skills that are required for the job. And suppose you are lacking work experience, concerning the position you are opting for. Also, you have many gaps in employment. Then the best format suited to you is functional format.

6 0
3 years ago
Read 2 more answers
Which of the following lines correctly defines a String variable
lidiya [134]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is C i.e. String s = "apluse";

The rule or syntax of declaring string in any programming language is given below:

String variable-name = "yourString";

For declaring string variable, first, you write "String" that is a keyword of a programming languages for declaring string variables, such as int before the variable name for declaring integer variable. Then, you need to write a meaningful name of the string as a variable. After string variable name, you need to put the equal operator and then write the string in double quotation("") marks and after that put the instruction terminator that is ";".

So, according to this syntax, option C is correct.

While other options are not correct because:

In option a, string is not encapsulated in double quotation. Option B does not have varaible type such as String and Option E does not have variable name and its value also. So, only option C is correct and all other except C are incorrect.

3 0
2 years ago
Other questions:
  • Columns can be added to a page in the page layout tab in the blank grouping
    10·2 answers
  • Which of the following is an accurate statement? When the LOWER function is used in a SELECT clause, it will automatically store
    6·1 answer
  • What is the first computer ever made?????
    9·2 answers
  • What is the best way to learn JavaScript?
    5·2 answers
  • The term generally used to describe storage systems that function at high speeds is:
    12·1 answer
  • Which line of code will only allow a symbol to be stored in a variable?
    11·2 answers
  • Java: which expression is evaluated first
    13·1 answer
  • What icons in the toolbar change the look of the presentation text? It’s either Drawing, Formatting,Presentation, or Standard
    9·2 answers
  • Why might an algorithm created to assist in hiring decisions be biased?
    15·1 answer
  • 9.4 Code Practice: Your task is to determine whether each item in the array above is divisible
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!