Saturday 3 August 2024

Happy Friendship Day using Python

 



from rich.console import Console

from rich.text import Text

console = Console()

# Create the message and color mapping

text = "Happy Friendship Day!"

colors = [

    "red", "yellow", "green", "cyan", "blue", "white", "magenta",

    "red", "yellow", "green", "cyan", "blue", "magenta", "red",

    "yellow", "green", "white", "cyan", "blue", "magenta", "red"

]

# Generate the colorful message

message = Text()

[message.append(char, style=color) for char,color in zip(text, colors)]

console.print(message)

#clcoding.com

Happy Friendship Day!



Happy Friendship Day using Python

import pyfiglet

from termcolor import colored

text = "Happy Friendship Day!"

fonts = ["slant"]

for i, word in enumerate(text.split()):

    font = pyfiglet.Figlet(font=fonts[i % len(fonts)])

    color = ["red", "green", "yellow", "blue", "magenta"][i % 5]

    ascii_art = font.renderText(word)

    print(colored(ascii_art, color))


#clcoding.com

    __  __                       

   / / / /___ _____  ____  __  __

  / /_/ / __ `/ __ \/ __ \/ / / /

 / __  / /_/ / /_/ / /_/ / /_/ / 

/_/ /_/\__,_/ .___/ .___/\__, /  

           /_/   /_/    /____/   


    ______     _                __     __    _     

   / ____/____(_)__  ____  ____/ /____/ /_  (_)___ 

  / /_  / ___/ / _ \/ __ \/ __  / ___/ __ \/ / __ \

 / __/ / /  / /  __/ / / / /_/ (__  ) / / / / /_/ /

/_/   /_/  /_/\___/_/ /_/\__,_/____/_/ /_/_/ .___/ 

                                          /_/      


    ____              __

   / __ \____ ___  __/ /

  / / / / __ `/ / / / / 

 / /_/ / /_/ / /_/ /_/  

/_____/\__,_/\__, (_)   

            /____/      


Happy Friendship Day using Python

print('\n'.join

 ([''.join

   ([('Friendship'[(x-y)%8 ]

     if((x*0.05)**2+(y*0.1)**2-1)

      **3-(x*0.05)**2*(y*0.1)

       **3<=0 else' ')

        for x in range(-30,30)])

         for y in range(15,-15,-1)]))

print("Happy Friendship Day !!")

#clcoding.com

                                                            

                                                            

                                                            

                shFriends           iendshFri               

            endshFriendshFrie   hFriendshFriendsh           

          iendshFriendshFriendshFriendshFriendshFri         

         iendshFriendshFriendshFriendshFriendshFrien        

        iendshFriendshFriendshFriendshFriendshFriends       

        endshFriendshFriendshFriendshFriendshFriendsh       

        ndshFriendshFriendshFriendshFriendshFriendshF       

        dshFriendshFriendshFriendshFriendshFriendshFr       

        shFriendshFriendshFriendshFriendshFriendshFri       

        hFriendshFriendshFriendshFriendshFriendshFrie       

         riendshFriendshFriendshFriendshFriendshFrie        

          endshFriendshFriendshFriendshFriendshFrie         

          ndshFriendshFriendshFriendshFriendshFrien         

            hFriendshFriendshFriendshFriendshFrie           

             riendshFriendshFriendshFriendshFrie            

              endshFriendshFriendshFriendshFrie             

                shFriendshFriendshFriendshFri               

                  riendshFriendshFriendshFr                 

                    ndshFriendshFriendshF                   

                       FriendshFriends                      

                          ndshFrien                         

                             Fri                            

                              i                             

                                                            

                                                            

                                                            

                                                            

Happy Friendship Day !!


0 Comments:

Post a Comment

Popular Posts

Categories

AI (29) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (122) C (77) C# (12) C++ (82) Course (67) Coursera (195) Cybersecurity (24) data management (11) Data Science (100) Data Strucures (7) Deep Learning (11) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Pandas (3) PHP (20) Projects (29) Python (840) Python Coding Challenge (279) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (41) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses