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
The WordPress Widgets submenu is located where on the WordPress site?
wel

Answer:

Appearances

Explanation:

In your dashboard, click on Appearance → Customize → Widgets. Choose the location where you'd like to place the widget on your site. Common options here include the Footer and Sidebar, but this may be different depending on your theme..

Go to Appearance > Widgets in the WordPress Administration Screens. Choose a Widget and either drag it to the sidebar where you wish it to appear, or click the widget, (select a destination sidebar if your theme has more than one) and click the Add Widget button.

[ RevyBreeze ]

4 0
2 years ago
Which of the following is NOT an option in the comments group
IgorLugansk [536]
I need the options to help you out, thanks. :)
4 0
3 years ago
The action in which a router divides and forwards incoming or outbound message traffic to multiple links is known as
kipiarov [429]
Load balancing is my best guess.
5 0
3 years ago
Vadik is creating a program where the user inputs their grade level and the program tells them which sports teams they are allow
Lelechka [254]
He should use if, elif, else
4 0
2 years ago
Read 2 more answers
Importing data is sending data to a new file.Is this true or false
Kipish [7]

false homie I gotcho


3 0
3 years ago
Read 2 more answers
Other questions:
  • Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce
    9·1 answer
  • The famous study entitled ""Protection Analysis: Final Report"" focused on a project undertaken by ARPA to understand and detect
    14·1 answer
  • A student opens a recently purchased software package and begins reading the enclosed materials. What information might be inclu
    6·1 answer
  • To gain a competitive edge this year, the upper management of a global IT company has decided to focus on customer service, empl
    13·1 answer
  • Which country was the first in the world to launch a mass media campaign in response to population growth?
    14·1 answer
  • Which of the following technologies is an example of social media
    12·1 answer
  • Picking up sound over a great distance while making it seem to come from close up.
    11·1 answer
  • Which of the following is not a data visualization technique?
    6·1 answer
  • Stroke weight - ____ of the line around a shape or size of the point
    8·1 answer
  • you are investigating the use of website and url content filtering to prevent users from visiting certain websites. which benefi
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!