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]
3 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]3 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
if you are trying to reduce your debt, which of these expenses should you consider cutting out or cutting back on first?
Ainat [17]
Pay off highest interest rates first

cut back on un needed expenses-coffee, itunes etc


8 0
4 years ago
What can be designed to create annoying glitches or destoey data?...
daser333 [38]

WELL YOU ARE RIGHT its virus

hope it helps

3 0
4 years ago
Read 2 more answers
Features of action files​
nadezda [96]

Answer and explanation:

An ".action" file is a file written in Xcode and used by the <u>Automator</u> program, whose function is to create automations in macOS.  Action files contains specific actions that can be combined with other actions to create an automated process.

This type of file is used to automate tasks in <u>macOS</u>, usually with Finder (file manager) or another program.  

Action files are especially useful for repetitive tasks, such as creating sequential batch folders, editing images, or deleting files.

6 0
3 years ago
In which year was chip used inside the computer for the first time?? ​
AfilCa [17]

the first chip was invented in 1975

hope this help!

5 0
3 years ago
Read 2 more answers
What are somd negetive aspects and some positive aspects of having robots as a part of workplace?
aksik [14]

Answer and Explanation:

Some of the negative aspects of robots at work place:

  • Lesser flexibility
  • Higher maintenance and installation cost
  • Future insecurity and risk if the system malfunctions
  • A decline in the opportunities for humans
  • Unemployment as a result of automation and robot regulated work place.

Some of the positive aspects of robots at work place:

  • Higher accuracy
  • Higher speeds
  • More work in less time
  • Productivity and hence efficiency will increase
  • Cost of some operations is reduced.
  • Ease of employing in dangerous and hazardous fields by using specific robots for each task
5 0
3 years ago
Other questions:
  • Give two reasons why it is important to upgrade your browser when a new version becomes available.
    8·1 answer
  • Where are all of your documents saved?
    14·2 answers
  • Write the reverseO function recursively. This function takes a string and the length of the string as arguments and returns the
    15·2 answers
  • For what tools such as USMT and Treanxition used?
    15·1 answer
  • Complete the PizzaCaloriesPerSlice() function to compute the calories for a single slice of pizza. A PizzaCalories() function re
    6·1 answer
  • categorize each job role as an administrative job or management job auditor director legal secretary payroll clerk etc ​
    8·1 answer
  • A stock transfer from a storage bin in one warehouse to a storage bin in another warehouse is a possible scenario under which wa
    5·1 answer
  • Lan is working on a project report that will go through multiple rounds of
    10·1 answer
  • A software engineering process (SEP), also known as a software development process, defines the ______ of developing software.
    5·1 answer
  • What is a benefit of an account with interest?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!