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
d1i1m1o1n [39]
2 years ago
8

Program: ASCII art (Python 3)1) Output this tree. 2) Below the tree (with two blank lines), output this cat. (3 pts) /\ /\ o o =

= --- Hint: A backslash \ in a string acts as an escape character, such as with a newline \n. So, to print an actual backslash, escape that backslash by prepending another backslash. Ex: The following prints a single backslash: System.out.println("\\");

Computers and Technology
1 answer:
Julli [10]2 years ago
8 0

The correct format for the output this tree is shown below:

(1) Output this tree

    ×

  ×××

×××××

×××××××

  ×××

(2) The correct format for the Below the tree is shown below:

Below the tree (with two blank lines), output this cat. (3 pts)

  / \        / \

     o     o

 =           =

   -   -   -

Answer:

Explanation:

We are given an Hint that:

A backslash \ in a string acts as an escape character, such as with a newline \n. So, to print an actual backslash, escape that backslash by prepending another backslash.

An Example : The following prints a single backslash: System.out.println("\\");

The main objective here is to use a Java code to interpret the above  (1) Output this tree and  (2) Below the tree.

So Using a Java code to interpret the Program: ASCII art ; we have:

public class AsciiArt {

  public static void main(String[] args) {

      // TODO Auto-generated method stub

 

      //Draw Tree

    System.out.println(" *");

      System.out.println(" ***");

      System.out.println(" *****");

      System.out.println("*******");

      System.out.println(" ***");

      //output cat

      System.out.println();

      System.out.println("/\\\t/\\");

      System.out.println(" o o");

      System.out.println(" = =")

      System.out.println(" ---");

  }

OUTPUT:

SEE THE ATTACHED FILE BELOW.

You might be interested in
What does CS mean? idk
Rainbow [258]
Computer science or computer software
3 0
2 years ago
Read 2 more answers
List two items that are required to make a text file into a bash script.
Olenka [21]

Answer:

Explanation:

First a header is needed indicating which bash will be used (sh, zsh, bash, etc.), then it is necessary to change the file extension so that the system recognizes it as an executable file and no longer as text

6 0
3 years ago
You have just provided the identification number that associates your new software purchase with the mobile device on which you
Lunna [17]
<span>software deployment, software decryption, app installation, product activation

Are those the answers to choose from?

</span>
5 0
3 years ago
Hydraulic pressure is the same throughout the inside of a set of brake lines. What determines the amount of resulting mechanical
cestrela7 [59]

Answer: 1000 square ponds of force hope you know the answer

Explanation: i guessed

7 0
2 years ago
STAY AWAY FROM AND REPORT mariaivanovaloveyou!!!!!!! SHE IS A BRAINLY USER AND KEEPS POSTING INAPPROPRIATE PICTURES OF HER BODY
Bond [772]

Answer:

Yep, saw her posts. Thanks for the warning though. I reported one of her posts. It's just another example of how desperate people are and what measures they will take to get attention. She'll probably be banned soon

Explanation:

Thank you for the warning though. I hope this reaches more people.

7 0
2 years ago
Other questions:
  • Bitnet, one of the predecessors of the internet was launched in 1981. what does bitnet stand for?
    12·1 answer
  • Hen using presentation software, what do you do when you "compose a slide"?
    5·1 answer
  • List at least 4 types of works covered by copyright law
    5·1 answer
  • Emerson needs to tell his browser how to display a web page. Which tool will he use?
    8·2 answers
  • Your desktop, internet explorer, and the media player can be started from this area on most computers
    9·1 answer
  • To more easily incorporate methods into a program, it is common practice to store methods in their own classes and files. Then y
    6·1 answer
  • Gear systems with __________ can have both drive and driven gears on the same shaft. a. an odd number of gears b. an even number
    6·1 answer
  • What are 3 ways to select an entire document?
    15·1 answer
  • Code embedded into an HTML page and downloaded by a user; resides on the client and helps process Web form input. Common clients
    9·1 answer
  • What is the result of executing the following code? You can assume the code compiles and runs. #include using namespace std; voi
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!