Saturday, December 28, 2024

Happy Birthday Vaibhav(Love) Using Python Turtle


import turtle as tech_habit
ankita = tech_habit.Screen()
ankita.bgcolor("black")
tech_habit.pencolor("linen")
colors_design = ["#f5ac2f", "#279cf5", "#d820f5", "#a2f52f", "#f527c1"]
colors_heart = ["orange", "red", "dark blue", "green", "#fc037f", "gold", "ivory", "red", "pink",
"green", "blue", "light green", ]
def move(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.lt(90)
tech_habit.fd(y)
tech_habit.pendown()

def mov(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.lt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.pendown()


def draw_ankita(i, x, y):
tech_habit.pencolor("linen")
tech_habit.color(colors_design[i % 7])
tech_habit.lt(70)
tech_habit.penup()
tech_habit.goto(x, y)
tech_habit.pendown()
tech_habit.circle(22)
tech_habit.end_fill()

def curve():
for i in range(200):
tech_habit.right(1)
tech_habit.forward(1)
#
# def heart():
# tech_habit.fillcolor('red')
# tech_habit.begin_fill()
# tech_habit.left(140)
# tech_habit.forward(113)
# curve()
# tech_habit.left(120)
# curve()
# tech_habit.forward(112)
# tech_habit.end_fill()

def heart():
for i in range(43):
tech_habit.pencolor(colors_heart[i % 9])
tech_habit.rt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.fd(150)
tech_habit.penup()
tech_habit.rt(140)
tech_habit.fd(147)
tech_habit.pendown()
for i in range(43):
tech_habit.pencolor(colors_heart[i % 9])
tech_habit.lt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.lt(7)
tech_habit.fd(151)

def I(size):
tech_habit.rt(90)
tech_habit.fd(int(size/2))
tech_habit.bk(int(size/2)*2)
tech_habit.fd(int(size/2))
tech_habit.rt(270)
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size//2)
tech_habit.backward(size)


def U(size):
tech_habit.fd(size)
tech_habit.bk(size)
tech_habit.rt(90)
tech_habit.fd(size//1.8)
tech_habit.rt(90)
tech_habit.back(size)


def V(size):
tech_habit.right(20)
tech_habit.fd(size)
tech_habit.back(size)
tech_habit.lt(40)
tech_habit.fd(size)
tech_habit.back(size)

def A(size):
tech_habit.rt(19)
tech_habit.forward(size)
tech_habit.rt(141)
tech_habit.fd(size)
tech_habit.backward(size / 2)
tech_habit.rt(105)
tech_habit.fd(int(size / 3))


def B(size):
tech_habit.forward(size)
tech_habit.rt(90)
for i in range(18):
tech_habit.rt(9)
tech_habit.fd(size // 20)
for i in range(18):
tech_habit.rt(size // 5)
tech_habit.backward(size // 20)



def D(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 10)
for i in range(13):
tech_habit.rt(13)
tech_habit.fd(size // 8)







def G(size):
tech_habit.pensize(10)
tech_habit.penup()
tech_habit.fd(size // 2)
tech_habit.pendown()
tech_habit.lt(90)
tech_habit.fd(size // 4)
tech_habit.backward(size // 1.5)
tech_habit.lt(90)
for _ in range(size):
tech_habit.rt(4)
tech_habit.fd(4)

def S(size):
tech_habit.rt(90)
for i in range(0,5):
if i<3:
tech_habit.fd(size/2)
tech_habit.lt(90)
if i==2:
tech_habit.rt(90)
else:
tech_habit.right(90)
tech_habit.fd(size/2)

def M(size):
tech_habit.fd(int(size/2))
tech_habit.rt(135)
tech_habit.fd(int(size/3))
tech_habit.lt(90)
tech_habit.fd(int(size/3))
tech_habit.rt(135)
tech_habit.fd(int(size/2))


def H(size):
tech_habit.fd(size)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.lt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size)


def P(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 8)
for i in range(8):
tech_habit.rt(20)
tech_habit.fd(size // 9)

def R():
tech_habit.fd(60)
tech_habit.rt(90)
tech_habit.fd(7)
for i in range(15):
tech_habit.rt(12)
tech_habit.fd(3)
tech_habit.lt(120)
tech_habit.fd(40)

def T(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)


def Y(size):
tech_habit.fd(size)
tech_habit.left(60)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 1.5)


def I_small(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.circle(size//8)


def ballon(x, y):
tech_habit.pensize(4)
for i in range(5):
draw_ankita(i, x, y)


tech_habit.speed(0)
# Bottom Line 1
tech_habit.pensize(5)
tech_habit.penup()
tech_habit.goto(-180,-120)
tech_habit.color("brown")
tech_habit.pendown()
tech_habit.forward(300)

# Mid Line 2
tech_habit.penup()
tech_habit.goto(-160,-110)
tech_habit.color("brown")
tech_habit.pendown()
tech_habit.forward(250)

# First Line 3
tech_habit.penup()
tech_habit.goto(-130,-100)
tech_habit.color("brown")
tech_habit.pendown()
tech_habit.forward(200)

# Cake
tech_habit.penup()
tech_habit.goto(-100,-90)
tech_habit.color("skyblue")
tech_habit.begin_fill()
tech_habit.pendown()
tech_habit.forward(140)
tech_habit.left(90)
tech_habit.forward(95)
tech_habit.left(90)
tech_habit.forward(140)
tech_habit.left(90)
tech_habit.forward(95)
tech_habit.end_fill()

# Candles
tech_habit.pensize(3)
tech_habit.penup()
tech_habit.goto(-90,0)
tech_habit.color("#f5ac2f")
tech_habit.left(180)
tech_habit.pendown()
tech_habit.forward(20)


tech_habit.penup()
tech_habit.goto(-60,0)
tech_habit.color("#279cf5")
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(-30,0)
tech_habit.color("#d820f5")
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(0,0)
tech_habit.color("#a2f52f")
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(30,0)
tech_habit.color("#f527c1")
tech_habit.pendown()
tech_habit.forward(20)

colors = ["red", "orange", "yellow", "green", "black", "purple", "green"]
tech_habit.penup()
tech_habit.goto(-40,-50)
tech_habit.pendown()

for each_color in colors:
angle = 360 / len(colors)
tech_habit.color(each_color)
tech_habit.circle(10)
tech_habit.right(angle)
tech_habit.forward(10)

tech_habit.speed(0)
ballon(-300, 280)
ballon(300, 280)
ballon(300, -280)
ballon(-300, -280)
ballon(-300, 0)
ballon(300, 0)

tech_habit.pencolor("#2b92ed")
tech_habit.width(7)
mov(260,150)
H(100)
mov(190,150)
A(65)
mov(135,150)
P(60)
mov(100,150)
P(60)
mov(52,150)
Y(60)
mov(28,150)
B(60)
move(8,150)
I_small(60)
move(36,150)
R()
move(80,150)
T(100)
move(102,150)
H(60)
move(150,150)
tech_habit.pencolor('#c02bed')
D(180)
move(160,150)
A(60)
move(220,150)
Y(60)

tech_habit.pencolor('#f527c1')
mov(150,40)
V(60)
mov(130,40)
A(60)
mov(80,40)
I_small(60)
mov(60,40)
B(60)
mov(30,40)
H(60)
mov(-10,40)
A(60)
mov(-70,40)
V(60)

tech_habit.penup()
mov(180,-320)
tech_habit.pendown()
#tech_habit.pencolor('#984cf5')
tech_habit.pencolor("red")

tech_habit.pensize(10)
I(150)
tech_habit.penup()
mov(-20,-180)
tech_habit.pendown()
heart()
tech_habit.penup()
mov(-150,-320)
tech_habit.pendown()
U(150)

ankita.exitonclick()

Wednesday, December 25, 2024

Getting Started with Google Cloud Platform (GCP)

Google Cloud Platform (GCP) is a suite of cloud computing services offered by Google. It provides developers and businesses with scalable tools to build, deploy, and manage applications. Whether you are a data engineer, developer, or just exploring the world of cloud computing, GCP offers a great starting point with its user-friendly interface and powerful features.

In this guide, we’ll walk through how to set up your GCP account, navigate the console, and deploy your first project

1. Setting Up Your GCP Account

Getting started with GCP is simple:

  1. Go to the Google Cloud Platform website.

  2. Click on “Get started for free” to create an account.

  3. Sign in with your Google account or create one if you don’t have it.

  4. Fill in your billing information. Don’t worry—Google offers $300 in free credits for new users, which you can use to explore its services.

Once you’re set up, you’re ready to dive into the console.


2. Navigating the GCP Console

The GCP console is the central hub where you manage your cloud resources. After logging in, you’ll see:

  • Dashboard: Displays an overview of your projects and resources.

  • Navigation Menu: Access to all GCP services, from Compute Engine to BigQuery.

  • Cloud Shell: A built-in terminal for managing resources using command-line tools.

Spend a few minutes exploring the interface to familiarize yourself with these features.


3. Creating Your First Project

Projects in GCP act as containers for your resources. Here’s how to create one:

  1. In the console, click on the project selector dropdown at the top.

  2. Click “New Project” and enter a name for your project.

  3. Set the billing account (required for usage tracking).

  4. Click “Create” to initialize the project.

Your project is now ready for deploying resources.


4. Deploying a Simple Application

Let’s deploy a static website using Google Cloud Storage:

  1. Go to Storage from the navigation menu.

  2. Click on Create bucket and enter a globally unique name.

  3. Choose the Standard storage class and set permissions to public access.

  4. Upload your HTML files to the bucket.

  5. Enable static website hosting in the bucket settings and specify your main HTML file.

Your website is now live! You can access it via the provided public URL.


5. Monitoring Usage and Costs

To ensure you don’t exceed your free credits:

  • Go to the Billing section to track your spending.

  • Set up budgets and alerts to receive notifications if costs approach your limit.


6. Next Steps

Now that you’ve created a project and deployed an app, consider exploring other GCP services:

  • BigQuery: Analyze large datasets.

  • Cloud Functions: Run event-driven serverless code.

  • Compute Engine: Launch virtual machines.

Google also offers comprehensive documentation and tutorials to deepen your understanding.


Happy cloud computing!!!!

Friday, May 12, 2023

Happy Birthday Priya Using Python Turtle Graphics

Happy Birthday Priya Using Python Turtle Graphics....

import turtle as tech_habit
from turtle import *
from random import randint

ankita = tech_habit.Screen()
ankita.bgcolor("black")
tech_habit = tech_habit.Turtle()
tech_habit.width(7)
tech_habit.shape('turtle')
tech_habit.speed(29)

colors = ["orange", "red", "dark blue", "green", "#fc037f", "gold", "ivory", "red", "pink",
"green", "blue", "light green", ]


def draw_ankita(i, x, y):
tech_habit.pencolor("linen")
tech_habit.color(colors[i % 7])
tech_habit.begin_fill()
tech_habit.lt(70)
tech_habit.penup()
tech_habit.goto(x, y)
tech_habit.pendown()
tech_habit.circle(33)
tech_habit.end_fill()


def ballon(x, y):
tech_habit.pensize(1)
for i in range(5):
draw_ankita(i, x, y)


def cake(x, y):
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)


def heart():
for i in range(43):
tech_habit.pencolor(colors[i % 9])
tech_habit.rt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.fd(150)
tech_habit.penup()
tech_habit.rt(140)
tech_habit.fd(147)
tech_habit.pendown()
for i in range(43):
tech_habit.pencolor(colors[i % 9])
tech_habit.lt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.lt(7)
tech_habit.fd(151)


def move(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.lt(90)
tech_habit.fd(y)
tech_habit.pendown()


def mov(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.lt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.pendown()


def A(size):
tech_habit.rt(19)
tech_habit.forward(size)
tech_habit.rt(141)
tech_habit.fd(size)
tech_habit.backward(size / 2)
tech_habit.rt(105)
tech_habit.fd(int(size / 3))


def B(size):
tech_habit.forward(size)
tech_habit.rt(90)
for i in range(18):
tech_habit.rt(9)
tech_habit.fd(size // 20)
for i in range(18):
tech_habit.rt(size // 5)
tech_habit.backward(size // 20)



def D(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 10)
for i in range(13):
tech_habit.rt(13)
tech_habit.fd(size // 8)







def G(size):
tech_habit.pensize(10)
tech_habit.penup()
tech_habit.fd(size // 2)
tech_habit.pendown()
tech_habit.lt(90)
tech_habit.fd(size // 4)
tech_habit.backward(size // 1.5)
tech_habit.lt(90)
for _ in range(size):
tech_habit.rt(4)
tech_habit.fd(4)

def S(size):
tech_habit.rt(90)
for i in range(0,5):
if i<3:
tech_habit.fd(size/2)
tech_habit.lt(90)
if i==2:
tech_habit.rt(90)
else:
tech_habit.right(90)
tech_habit.fd(size/2)

def M(size):
tech_habit.fd(int(size/2))
tech_habit.rt(135)
tech_habit.fd(int(size/3))
tech_habit.lt(90)
tech_habit.fd(int(size/3))
tech_habit.rt(135)
tech_habit.fd(int(size/2))


def H(size):
tech_habit.fd(size)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.lt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size)

def I(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.circle(size//8)

def K(size):
tech_habit.fd(size)
tech_habit.backward(size//2)
tech_habit.rt(60)
tech_habit.fd(size//1.5)
tech_habit.backward(size//2)
tech_habit.rt(80)
tech_habit.fd(size//1.3)


def P(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 8)
for i in range(8):
tech_habit.rt(20)
tech_habit.fd(size // 9)

def R():
tech_habit.fd(60)
tech_habit.rt(90)
tech_habit.fd(7)
for i in range(15):
tech_habit.rt(12)
tech_habit.fd(3)
tech_habit.lt(120)
tech_habit.fd(40)

def T(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)

def U(size):
tech_habit.rt(90)
for i in range(size // 10):
tech_habit.lt(15)
tech_habit.fd(size // 10)
tech_habit.fd(size // 2)
tech_habit.back(size // 2)

for i in range(size // 10):
tech_habit.rt(13)
tech_habit.back(size // 10)
tech_habit.lt(5)
for i in range(size // 10):
tech_habit.rt(17)
tech_habit.back(size // 10)
tech_habit.back(size // 2)


def Y(size):
tech_habit.fd(size)
tech_habit.left(60)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 1.5)


tech_habit.width(5)

ballon(223, -150)
ballon(-233, -150)

mov(20,-130)
tech_habit.width(13)

heart()

#Name section
tech_habit.speed(40)
tech_habit.width(4)
tech_habit.pencolor("#d831de")

tech_habit.width(11)

mov(230,240)
P(60)
mov(170,240)
R()
mov(110,240)
I(60)
mov(50,240)
Y(60)
mov(20,240)
A(60)
mov(-20,240)
#A(60)


#Cake maker section
mov(120,80)
tech_habit.color("#94014b")
tech_habit.begin_fill()
cake(40,160)
tech_habit.end_fill()
mov(110,115)
tech_habit.color("#fa348a")
tech_habit.begin_fill()
cake(40,140)
tech_habit.end_fill()
mov(100,150)
tech_habit.color("#fa78b0")
tech_habit.begin_fill()
cake(40,120)
tech_habit.end_fill()
mov(35,200)
tech_habit.width(11)
tech_habit.pencolor("red")
tech_habit.circle(7)


#candles

tech_habit.pensize(3)
tech_habit.penup()
tech_habit.goto(-100,210)
tech_habit.color("red")
tech_habit.left(180)
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(-80,210)
tech_habit.color("orange")
tech_habit.pendown()
tech_habit.forward(20)


tech_habit.penup()
tech_habit.goto(-10,210)
tech_habit.color("orange")
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(20,210)
tech_habit.color("red")
tech_habit.pendown()
tech_habit.forward(20)


# #end Of Cake Section


# #ankitabithday
tech_habit.pencolor("#4ceda2")
tech_habit.width(13)
mov(260,-30)
H(100)
tech_habit.width(7)
mov(190,-30)
A(65)
mov(135,-30)
P(60)
mov(100,-30)
P(60)
mov(52,-30)
Y(60)
mov(28,-30)
B(60)
move(8,-30)
I(60)
move(36,-30)
R()
move(80,-30)
T(100)
move(102,-30)
H(60)
move(150,-30)
tech_habit.pencolor('hotpink')
D(200)
move(160,-30)
A(60)
move(220,-30)
Y(60)

ankita.exitonclick()

Tuesday, April 25, 2023

Happy Birthday shikha using python turtle graphics

Happy Birthday Shikha using python turtle graphics 

import turtle as tech_habit

from turtle import *
from random import randint

ankita = tech_habit.Screen()
ankita.bgcolor("black")
tech_habit = tech_habit.Turtle()
tech_habit.width(7)
tech_habit.shape('turtle')
tech_habit.speed(29)

colors = ["orange", "red", "dark blue", "green", "#fc037f", "gold", "ivory", "red", "pink",
"green", "blue", "light green", ]


def draw_ankita(i, x, y):
tech_habit.pencolor("linen")
tech_habit.color(colors[i % 7])
tech_habit.begin_fill()
tech_habit.lt(70)
tech_habit.penup()
tech_habit.goto(x, y)
tech_habit.pendown()
tech_habit.circle(33)
tech_habit.end_fill()


def ballon(x, y):
tech_habit.pensize(1)
for i in range(5):
draw_ankita(i, x, y)


def cake(x, y):
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)


def heart():
for i in range(43):
tech_habit.pencolor(colors[i % 9])
tech_habit.rt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.fd(150)
tech_habit.penup()
tech_habit.rt(140)
tech_habit.fd(147)
tech_habit.pendown()
for i in range(43):
tech_habit.pencolor(colors[i % 9])
tech_habit.lt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.lt(7)
tech_habit.fd(151)


def move(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.lt(90)
tech_habit.fd(y)
tech_habit.pendown()


def mov(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.lt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.pendown()


def A(size):
tech_habit.rt(19)
tech_habit.forward(size)
tech_habit.rt(141)
tech_habit.fd(size)
tech_habit.backward(size / 2)
tech_habit.rt(105)
tech_habit.fd(int(size / 3))


def B(size):
tech_habit.forward(size)
tech_habit.rt(90)
for i in range(18):
tech_habit.rt(9)
tech_habit.fd(size // 20)
for i in range(18):
tech_habit.rt(size // 5)
tech_habit.backward(size // 20)



def D(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 10)
for i in range(13):
tech_habit.rt(13)
tech_habit.fd(size // 8)







def G(size):
tech_habit.pensize(10)
tech_habit.penup()
tech_habit.fd(size // 2)
tech_habit.pendown()
tech_habit.lt(90)
tech_habit.fd(size // 4)
tech_habit.backward(size // 1.5)
tech_habit.lt(90)
for _ in range(size):
tech_habit.rt(4)
tech_habit.fd(4)

def S(size):
tech_habit.rt(90)
for i in range(0,5):
if i<3:
tech_habit.fd(size/2)
tech_habit.lt(90)
if i==2:
tech_habit.rt(90)
else:
tech_habit.right(90)
tech_habit.fd(size/2)

def M(size):
tech_habit.fd(int(size/2))
tech_habit.rt(135)
tech_habit.fd(int(size/3))
tech_habit.lt(90)
tech_habit.fd(int(size/3))
tech_habit.rt(135)
tech_habit.fd(int(size/2))


def H(size):
tech_habit.fd(size)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.lt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size)

def I(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.circle(size//8)

def K(size):
tech_habit.fd(size)
tech_habit.backward(size//2)
tech_habit.rt(60)
tech_habit.fd(size//1.5)
tech_habit.backward(size//2)
tech_habit.rt(80)
tech_habit.fd(size//1.3)


def P(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 8)
for i in range(8):
tech_habit.rt(20)
tech_habit.fd(size // 9)

def R():
tech_habit.fd(60)
tech_habit.rt(90)
tech_habit.fd(7)
for i in range(15):
tech_habit.rt(12)
tech_habit.fd(3)
tech_habit.lt(120)
tech_habit.fd(40)

def T(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)

def U(size):
tech_habit.rt(90)
for i in range(size // 10):
tech_habit.lt(15)
tech_habit.fd(size // 10)
tech_habit.fd(size // 2)
tech_habit.back(size // 2)

for i in range(size // 10):
tech_habit.rt(13)
tech_habit.back(size // 10)
tech_habit.lt(5)
for i in range(size // 10):
tech_habit.rt(17)
tech_habit.back(size // 10)
tech_habit.back(size // 2)


def Y(size):
tech_habit.fd(size)
tech_habit.left(60)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 1.5)


tech_habit.width(5)

ballon(223, -150)
ballon(-233, -150)

mov(20,-130)
tech_habit.width(13)

heart()

#Name section
tech_habit.speed(40)
tech_habit.width(4)
tech_habit.pencolor("#d831de")

tech_habit.width(11)

mov(230,240)
S(60)
mov(170,240)
H(60)
mov(110,240)
I(60)
mov(75,240)
K(60)
mov(20,240)
H(60)
mov(-20,240)
A(60)


#Cake maker section
mov(120,80)
tech_habit.color("#94014b")
tech_habit.begin_fill()
cake(40,160)
tech_habit.end_fill()
mov(110,115)
tech_habit.color("#fa348a")
tech_habit.begin_fill()
cake(40,140)
tech_habit.end_fill()
mov(100,150)
tech_habit.color("#fa78b0")
tech_habit.begin_fill()
cake(40,120)
tech_habit.end_fill()
mov(35,200)
tech_habit.width(11)
tech_habit.pencolor("red")
tech_habit.circle(7)


#candles

tech_habit.pensize(3)
tech_habit.penup()
tech_habit.goto(-100,210)
tech_habit.color("red")
tech_habit.left(180)
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(-80,210)
tech_habit.color("orange")
tech_habit.pendown()
tech_habit.forward(20)


tech_habit.penup()
tech_habit.goto(-10,210)
tech_habit.color("orange")
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(20,210)
tech_habit.color("red")
tech_habit.pendown()
tech_habit.forward(20)


# #end Of Cake Section


# #ankitabithday
tech_habit.pencolor("#4ceda2")
tech_habit.width(13)
mov(260,-30)
H(100)
tech_habit.width(7)
mov(190,-30)
A(65)
mov(135,-30)
P(60)
mov(100,-30)
P(60)
mov(52,-30)
Y(60)
mov(28,-30)
B(60)
move(8,-30)
I(60)
move(36,-30)
R()
move(80,-30)
T(100)
move(102,-30)
H(60)
move(150,-30)
tech_habit.pencolor('hotpink')
D(200)
move(160,-30)
A(60)
move(220,-30)
Y(60)

ankita.exitonclick()

Saturday, December 17, 2022

Happy Birthday SIMI Using Python Turtle Graphics...

Happy Birthday Simi... 

import turtle as tech_habit

from turtle import *
from random import randint

ankita = tech_habit.Screen()
ankita.bgcolor("black")
tech_habit = tech_habit.Turtle()
tech_habit.width(7)
tech_habit.shape('turtle')
tech_habit.speed(29)

colors = ["orange", "red", "dark blue", "green", "#fc037f", "gold", "ivory", "red", "pink",
"green", "blue", "light green", ]


def draw_ankita(i, x, y):
tech_habit.pencolor("linen")
tech_habit.color(colors[i % 7])
tech_habit.begin_fill()
tech_habit.lt(70)
tech_habit.penup()
tech_habit.goto(x, y)
tech_habit.pendown()
tech_habit.circle(33)
tech_habit.end_fill()


def ballon(x, y):
tech_habit.pensize(1)
for i in range(5):
draw_ankita(i, x, y)


def cake(x, y):
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)


def heart():
for i in range(43):
tech_habit.pencolor(colors[i % 9])
tech_habit.rt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.fd(150)
tech_habit.penup()
tech_habit.rt(140)
tech_habit.fd(147)
tech_habit.pendown()
for i in range(43):
tech_habit.pencolor(colors[i % 9])
tech_habit.lt(5)
tech_habit.fd(5)
tech_habit.pencolor("red")
tech_habit.lt(7)
tech_habit.fd(151)


def move(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.rt(90)
tech_habit.fd(x)
tech_habit.lt(90)
tech_habit.fd(y)
tech_habit.pendown()


def mov(x, y):
tech_habit.up()
tech_habit.setposition(0, 0)
tech_habit.setheading(90)
tech_habit.lt(90)
tech_habit.fd(x)
tech_habit.rt(90)
tech_habit.fd(y)
tech_habit.pendown()


def A(size):
tech_habit.rt(19)
tech_habit.forward(size)
tech_habit.rt(141)
tech_habit.fd(size)
tech_habit.backward(size / 2)
tech_habit.rt(105)
tech_habit.fd(int(size / 3))


def B(size):
tech_habit.forward(size)
tech_habit.rt(90)
for i in range(18):
tech_habit.rt(9)
tech_habit.fd(size // 20)
for i in range(18):
tech_habit.rt(size // 5)
tech_habit.backward(size // 20)



def D(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 10)
for i in range(13):
tech_habit.rt(13)
tech_habit.fd(size // 8)







def G(size):
tech_habit.pensize(10)
tech_habit.penup()
tech_habit.fd(size // 2)
tech_habit.pendown()
tech_habit.lt(90)
tech_habit.fd(size // 4)
tech_habit.backward(size // 1.5)
tech_habit.lt(90)
for _ in range(size):
tech_habit.rt(4)
tech_habit.fd(4)

def S(size):
tech_habit.rt(90)
for i in range(0,5):
if i<3:
tech_habit.fd(size/2)
tech_habit.lt(90)
if i==2:
tech_habit.rt(90)
else:
tech_habit.right(90)
tech_habit.fd(size/2)

def M(size):
tech_habit.fd(int(size/2))
tech_habit.rt(135)
tech_habit.fd(int(size/3))
tech_habit.lt(90)
tech_habit.fd(int(size/3))
tech_habit.rt(135)
tech_habit.fd(int(size/2))


def H(size):
tech_habit.fd(size)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.lt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size)


def I(size):
tech_habit.rt(90)
tech_habit.fd(int(size/2))
tech_habit.bk(int(size/2)*2)
tech_habit.fd(int(size/2))
tech_habit.rt(270)
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size//2)
tech_habit.backward(size)


def P(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 8)
for i in range(8):
tech_habit.rt(20)
tech_habit.fd(size // 9)

def R():
tech_habit.fd(60)
tech_habit.rt(90)
tech_habit.fd(7)
for i in range(15):
tech_habit.rt(12)
tech_habit.fd(3)
tech_habit.lt(120)
tech_habit.fd(40)

def T(size):
tech_habit.fd(size)
tech_habit.rt(90)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)

def U(size):
tech_habit.rt(90)
for i in range(size // 10):
tech_habit.lt(15)
tech_habit.fd(size // 10)
tech_habit.fd(size // 2)
tech_habit.back(size // 2)

for i in range(size // 10):
tech_habit.rt(13)
tech_habit.back(size // 10)
tech_habit.lt(5)
for i in range(size // 10):
tech_habit.rt(17)
tech_habit.back(size // 10)
tech_habit.back(size // 2)


def Y(size):
tech_habit.fd(size)
tech_habit.left(60)
tech_habit.fd(size // 2)
tech_habit.backward(size // 2)
tech_habit.rt(90)
tech_habit.fd(size // 1.5)


tech_habit.width(5)

ballon(223, -150)
ballon(-233, -150)

mov(20,-130)
tech_habit.width(13)

heart()

#Name section
tech_habit.speed(40)
tech_habit.width(4)
tech_habit.pencolor("#d831de")

tech_habit.width(11)

mov(230,240)
S(60)
mov(140,240)
I(60)
mov(90,240)
M(120)
mov(-10,240)
I(60)


#Cake maker section
tech_habit.speed(3)
mov(120,80)
tech_habit.color("#94014b")
tech_habit.begin_fill()
cake(40,160)
tech_habit.end_fill()
mov(110,115)
tech_habit.color("#fa348a")
tech_habit.begin_fill()
cake(40,140)
tech_habit.end_fill()
mov(100,150)
tech_habit.color("#fa78b0")
tech_habit.begin_fill()
cake(40,120)
tech_habit.end_fill()
mov(35,200)
tech_habit.width(11)
tech_habit.pencolor("red")
tech_habit.circle(7)


#candles

tech_habit.pensize(3)
tech_habit.penup()
tech_habit.goto(-100,210)
tech_habit.color("red")
tech_habit.left(180)
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(-80,210)
tech_habit.color("orange")
tech_habit.pendown()
tech_habit.forward(20)


tech_habit.penup()
tech_habit.goto(-10,210)
tech_habit.color("orange")
tech_habit.pendown()
tech_habit.forward(20)

tech_habit.penup()
tech_habit.goto(20,210)
tech_habit.color("red")
tech_habit.pendown()
tech_habit.forward(20)


# #end Of Cake Section


# #ankitabithday
tech_habit.pencolor("#4ceda2")
tech_habit.width(13)
mov(260,-30)
H(100)
tech_habit.width(7)
mov(190,-30)
A(65)
mov(135,-30)
P(60)
mov(100,-30)
P(60)
mov(52,-30)
Y(60)
mov(28,-30)
B(60)
move(12,-30)
I(60)
move(36,-30)
R()
move(80,-30)
T(100)
move(102,-30)
H(60)
move(150,-30)
tech_habit.pencolor('hotpink')
D(200)
move(160,-30)
A(60)
move(220,-30)
Y(60)

ankita.exitonclick()

Happy Birthday Vaibhav(Love) Using Python Turtle

import  turtle  as  tech_habit ankita = tech_habit.Screen() ankita.bgcolor( "black" ) tech_habit.pencolor( "linen" ) col...