SortedCoding
1.2K subscribers
185 photos
38 videos
194 files
140 links
Learn to code with clarity and precision
Download Telegram
Darkmode.html
2.6 KB
Dark mode project
import turtle

def draw_flower():
turtle.penup()
turtle.left(90)
turtle.fd(200)
turtle.pendown()
turtle.right(90)

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

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

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

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

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

turtle.done()

# Call the function to draw the flower
draw_flower()
👍2
Rose 🌹
1
import turtle

t = turtle.Turtle()
t.speed(10)

for i in range(500):
t.forward(i)
t.left(50)
t.fillcolor('red')

turtle.done()
1
If this poll gets 300 'Yes' votes, I'll share a Full Stack Developer roadmap with 5 English and 5 Hindi playlists to learn everything for free! So why wait? Tap on 'Yes' now! 🚀
Anonymous Poll
95%
Yes!
5%
No
Download Source Code 👇
Watch the video on YouTube 👇

https://youtu.be/HS2BBN2Goo0
🔥1
👎1🔥1
New Project🔥🔥
🔥1
This media is not supported in your browser
VIEW IN TELEGRAM
Car animation using HTML CSS 💜💫
🔥21
Which of the following type is provided by C++ but not C?
Anonymous Quiz
42%
double
14%
float
6%
int
38%
bool
--- Do you like me Source Code ---


import tkinter as tk
import random

def show_popup():
    popup = tk.Toplevel(root)
    popup.title("Popup")
    label = tk.Label(popup, text="Thanks for Accepting")
    label.pack(padx=20, pady=20)

def move_button(event):
    x = random.randint(0, 350)
    y = random.randint(0, 350)
    no_button.place(x=x, y=y)

root = tk.Tk()
root.title("instagram: @sortedcoding")
root.geometry("400x400")

question_label = tk.Label(root, text="Do you like me?")
question_label.pack(pady=20)

yes_button = tk.Button(root, text="Yes", command=show_popup)
yes_button.pack()

no_button = tk.Button(root, text="No")
no_button.pack()

no_button.bind("<Enter>", move_button)

root.mainloop()
👍2
👍2