adsterra

Print Heart shape using Python | Pattern Program


Print Heart shape using Python.




Unlike other programming language, in Python you don’t  need to bother about class , their objects and semicolons etc.Python is as simple as English language. Here I am creating beautiful heart  shape within 4 lines of code.


Card image cap
Desktop Notifier using Python
Python Desktop Notifier using Win10toast module In this article ,you will learn how to create a simple Desktop Notifier application using Python. A desktop notifier is a simple application which generate a notification message in form of a pop-up message on desktop...
Card image cap
Print all alphabets (A-Z) with asterisk using Python
Python is a general purpose, high-level and interpreted programming language. The syntax of Python is as simple as You write the English Language. It is very easy to print any pattern, alphabets (A-Z)...

Card image cap
Python Mini Projects with Source code
Using Python You can Create a Mini project within few line of code.The things that You need to install is just Python IDE and the required library before importing it into program, and save your code with the extension of .py . You can run the program by simply click on them....


Heart.py


for row in range(6):

    for col in range(7):
        if(row==0 and col%3!=0) or (row==1 and col%3==0) or 
(row-col==2) or (row +col==8):
            print("*",end="")
        else:
            print(" ",end="")
    print()



Post a Comment

0 Comments