problemsolvewithridoy / Valentines-gift

Valentine's Gift using Python" is a project that creates a beautiful rose using the Python programming language. This project is perfect for those who want to express their love and affection to their loved ones on Valentine's Day. With just a few lines of Python code, you can create a stunning rose that can be customized with different colors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Valentine's Gift using python

Happy Valentine's day @all

"Valentine's Gift using Python" is a project that creates a beautiful rose using the Python programming language. This project is perfect for those who want to express their love and affection to their loved ones on Valentine's Day. With just a few lines of Python code, you can create a stunning rose that can be customized with different colors and styles.

The project utilizes the Turtle graphics module in Python to draw the rose petals, stem, and leaves. The user can choose from a variety of colors to customize the rose and make it unique. The code is simple and easy to understand, making it a great project for beginners who are learning Python.

By uploading this project on GitHub, others can easily access and learn from your code, as well as customize it to create their own unique Valentine's Day gift using Python.

In this project, I have make a rose using python turtle module. It is very eassy to use turtle so let's start...............

To make this project you need to follow this step:-

Installation

Install package with pip

  pip install turtle

Deployment

To deploy this project run

import turtle as tur
tur.title("Problem Solve with Ridoy")

# Set initial position
tur.penup ()
tur.left (90)
tur.fd (200)
tur.pendown ()
tur.right (90)

# flower base
tur.fillcolor ("red")
tur.begin_fill ()
tur.circle (10,180)
tur.circle (25,110)
tur.left (50)
tur.circle (60,45)
tur.circle (20,170)
tur.right (24)
tur.fd (30)
tur.left (10)
tur.circle (30,110)
tur.fd (20)
tur.left (40)
tur.circle (90,70)
tur.circle (30,150)
tur.right (30)
tur.fd (15)
tur.circle (80,90)
tur.left (15)
tur.fd (45)
tur.right (165)
tur.fd (20)
tur.left (155)
tur.circle (150,80)
tur.left (50)
tur.circle (150,90)
tur.end_fill ()

# Petal 1
tur.left (150)
tur.circle (-90,70)
tur.left (20)
tur.circle (75,105)
tur.setheading (60)
tur.circle (80,98)
tur.circle (-90,40)

# Petal 2
tur.left (180)
tur.circle (90,40)
tur.circle (-80,98)
tur.setheading (-83)

# Leaves 1
tur.fd (30)
tur.left (90)
tur.fd (25)
tur.left (45)
tur.fillcolor ("green")
tur.begin_fill ()
tur.circle (-80,90)
tur.right (90)
tur.circle (-80,90)
tur.end_fill ()
tur.right (135)
tur.fd (60)
tur.left (180)
tur.fd (85)
tur.left (90)
tur.fd (80)

# Leaves 2
tur.right (90)
tur.right (45)
tur.fillcolor ("green")
tur.begin_fill ()
tur.circle (80,90)
tur.left (90)
tur.circle (80,90)
tur.end_fill ()
tur.left (135)
tur.fd (60)
tur.left (180)
tur.fd (60)
tur.right (90)
tur.circle (200,60)


tur.write("Happy Valentines Day", align= "left", font=("Times New Roman", 25, "bold"))

tur.done() 

Output

Valentine's Gift

You can follow me

Facebook:- https://www.facebook.com/problemsolvewithridoy/

Linkedin:- https://www.linkedin.com/in/ridoyhossain/

YouTube:- https://www.youtube.com/@problemsolvewithridoy

Gmail:- entridoy2@gmail.com

If you have any confusion, please feel free to contact me. Thank you

About

Valentine's Gift using Python" is a project that creates a beautiful rose using the Python programming language. This project is perfect for those who want to express their love and affection to their loved ones on Valentine's Day. With just a few lines of Python code, you can create a stunning rose that can be customized with different colors

License:MIT License


Languages

Language:Python 100.0%