[PriP 1.1] Revision Tour-1 – Practical 1.1

|
Table of Contents

7. Write a program to print following ASCII art using print statements:-

  1. also called as Beavis and Butthead ASCII (text) art
       ________________                              _______________ 
      /                \                            / /           \ \ 
     / /          \ \   \                          |    -    -       \
     |                  |                          | /        -   \  |
    /                  /                           \                 \
   |      ___\ \| | / /                             \____________  \  \
   |      /           |                             |            \    | 
   |      |     __    |                             |             \   \ 
  /       |       \   |                             |              \  | 
  |       |        \  |                             | ====          | |
  |       |       __  |                             | (o-)      _   | | 
  |      __\     (_o) |                             /            \  | |
  |     |             |     Heh Heh Heh            /            ) ) | |
   \    ||             \      /      Huh Huh Huh  /             ) / | | 
    |   |__             \    /                \  |___            - |  | 
    |   |           (*___\  /                  \    *'             |  |
    |   |       _     |    /                    \  |____           |  |
    |   |    //_______|                             ####\          |  |
    |  /       |_|_|_|___/\                        ------          |_/  
     \|       \ -         |                        |                | 
      |       _----_______/                        \_____           | 
      |      /                                          \           |
      |_____/                                            \__________|

Solution:

You can also use single triple quotes for multi-line strings in Python but according to the question, individual print statements are used.

Python
# Name: Beavis ASCII Art

# ASCII Art
print("       ________________                              _______________ ")
print("      /                \\                            / /           \\ \\ ")
print("     / /          \\ \\   \\                          |    -    -       \\")
print("     |                  |                          | /        -   \\  |")
print("    /                  /                           \\                 \\")
print("   |      ___\\ \\| | / /                             \\____________  \\  \\")
print("   |      /           |                             |            \\    | ")
print("   |      |     __    |                             |             \\   \\ ")
print("  /       |       \\   |                             |              \\  | ")
print("  |       |        \\  |                             | ====          | |")
print("  |       |       __  |                             | (o-)      _   | | ")
print("  |      __\\     (_o) |                             /            \\  | |")
print("  |     |             |     Heh Heh Heh            /            ) ) | |")
print("   \\    ||             \\      /      Huh Huh Huh  /             ) / | | ")
print("    |   |__             \\    /                \\  |___            - |  | ")
print("    |   |           (*___\\  /                  \\    *'             |  |")
print("    |   |       _     |    /                    \\  |____           |  |")
print("    |   |    //_______|                             ####\\          |  |")
print("    |  /       |_|_|_|___/\\                        ------          |_/")
print("     \\|       \\ -         |                        |                | ")
print("      |       _----_______/                        \\_____           | ")
print("      |      /                                          \\           |")
print("      |_____/                                            \\__________|")
  1. Teddy Bear with a Hat ASCII (text) art
            .- - - - -. 
           ( #-... ' ` \ 
            \ #        |
            _)" ==== "|_
           (_`"======"`_)
            /`""""""""` \
           |        o  _o\
           |        ( _> | 
           \       ' .___/--#
            '.     ;-._:'\
              )===\   <>_/     __
       .---"" `====` - ` \__. ' `|
      /                ()\      /
      \___..--'           \_.-'
         |              ()|
         ;                ;
         \             ()/
          \         '.  /
       _.' `\         ';
      (      `\        \_
       \    .- `\        `\
        \____)   `._____ .'

Solution:

Again, print statements are used for each line. Required code is given as.

Python
# Name: Teddy Bear with a Hat ASCII Art

# ASCII Art
print("             .- - - - -. ")
print("            ( #-... ' ` \\ ")
print("             \\ #        | ")
print("             _)' ==== \"|_")
print("            (_`\"======\"`_)")
print("             /`\"\"\"\"\"\"\"` \\ ")
print("            |        o  _o\\")
print("            |        ( _> | ")
print("            \\       ' .___/--#")
print("             '.     ;-._:'\\")
print("               )===\\   <>_/     __")
print("      .---\"\"\" `====` - ` \\__. ' `|")
print("     /                     ()\\     /")
print("    \\___..--'             \\_.-'")
print("       |                 ()|")
print("       ;                   ;")
print("       \\                 ()/")
print("        \\          '.  /")
print("     _.' \\          ';")
print("    (     `\\        \\_")
print("     \\    .- `\\        `\\")
print("      \\____)   `._____ .'")

From understanding the fundamentals of identifiers to ASCII art, you’ve gained valuable insights into the world of programming. Remember, mastery comes with practice, so continue to hone your skills by experimenting with code and tackling more challenges.

"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *