PythonNotes

@pythonnotes1


Best Place for Learning Python Programming

Free Notes of Programming languages πŸ‘‡
β€’ Python β€’ Java β€’ JavaScript
β€’ C β€’ C++

Free Courses & Job Updates β˜‘οΈπŸ”ŽπŸ†“

PythonNotes (English)

Are you looking to enhance your programming skills or learn a new language? Look no further than PythonNotes! This Telegram channel is your go-to destination for all things Python programming. From beginner tips to advanced techniques, PythonNotes offers a wide range of resources to help you master this popular programming language.

In addition to Python, the channel also provides free notes on other programming languages such as Java, JavaScript, C, and C++. Whether you are a student, a professional looking to upskill, or simply someone interested in programming, PythonNotes has something for everyone.

But that's not all - PythonNotes goes beyond just providing notes. The channel also offers free courses and job updates to help you stay ahead in the competitive tech industry. With regular updates and valuable resources, PythonNotes is more than just a channel - it's a community of like-minded individuals striving to excel in the world of programming.

Join PythonNotes today and take your Python programming skills to the next level! Stay informed, stay inspired, and stay ahead with PythonNotes. #Python #Programming #Tech #Learning

PythonNotes

02 Oct, 11:09


SQL Interview Ques & ANS πŸ’₯

PythonNotes

03 Apr, 16:23


Handwritten Notes πŸ“

PythonNotes

28 Feb, 16:40


LEGEND Form Project πŸ˜…πŸ˜€
-----------------------------------------------------
Complete Source Code πŸ‘‡
-----------------------------------------------------

<html>
<head>
<style>

.outer{ 
margin:auto;
height:300px;
width:400px;
border:2px solid black;
position:relative
}
p{
margin-left:80px;
}
.in{
margin-left:80px;
padding:10px
}
#bt{
margin-top:20px;
position:absolute;
left:150px;
}
#bt:hover{
background:green;
font-size:13px;
cursor:pointer;
color:white;
}
</style>
<script>
function fa(){
if(a.value=="" || b.value==""){
f()
document.getElementById("a").style.border="3px solid red"
document.getElementById("b").style.border="3px solid red"
bt.value="Pahila data tak"
}
else{
document.getElementById("a").style.border="3px solid green"
document.getElementById("b").style.border="3px solid green"
bt.value="Ha thik ahe ata"
bt.style.left="120px";
}
}
flag=1
function f(){
if(flag==1){
bt.style.left="210px"
flag=2
}
else if(flag==2){
bt.style.left="80px"
flag=1
}
}
</script>
</head>
<body>
<div class="outer">
<h1 style="text-align:center">Legend form</h1>
<p>Enter Id</p>
<input class="in" type="text" placeholder="Enter id" id="a"/>
<p>Enter Confirm Pass</p>
<input class="in" type="password" placeholder="Enter password" id="b"/>
<br>
<input type="submit" onmouseenter="fa()" onclick="alert('waaaa')" id="bt" />

</div>

</body>


</html>

PythonNotes

22 Feb, 08:16


Snake Game using Turtle in Python βœ… Source Code πŸ‘‡πŸ‘‡

# import required modules
import turtle
import time
import random

delay = 0.1
score = 0
high_score = 0


# Creating a window screen
wn = turtle.Screen()
wn.title("Snake Game")
wn.bgcolor("blue")
# the width and height can be put as user's choice
wn.setup(width=600, height=600)
wn.tracer(0)

# head of the snake
head = turtle.Turtle()
head.shape("square")
head.color("white")
head.penup()
head.goto(0, 0)
head.direction = "Stop"

# food in the game
food = turtle.Turtle()
colors = random.choice(['red', 'green', 'black'])
shapes = random.choice(['square', 'triangle', 'circle'])
food.speed(0)
food.shape(shapes)
food.color(colors)
food.penup()
food.goto(0, 100)

pen = turtle.Turtle()
pen.speed(0)
pen.shape("square")
pen.color("white")
pen.penup()
pen.hideturtle()
pen.goto(0, 250)
pen.write("Score : 0  High Score : 0", align="center",
          font=("candara", 24, "bold"))


# assigning key directions
def group():
    if head.direction != "down":
        head.direction = "up"


def godown():
    if head.direction != "up":
        head.direction = "down"


def goleft():
    if head.direction != "right":
        head.direction = "left"


def goright():
    if head.direction != "left":
        head.direction = "right"


def move():
    if head.direction == "up":
        y = head.ycor()
        head.sety(y+20)
    if head.direction == "down":
        y = head.ycor()
        head.sety(y-20)
    if head.direction == "left":
        x = head.xcor()
        head.setx(x-20)
    if head.direction == "right":
        x = head.xcor()
        head.setx(x+20)


wn.listen()
wn.onkeypress(group, "w")
wn.onkeypress(godown, "s")
wn.onkeypress(goleft, "a")
wn.onkeypress(goright, "d")

segments = []

# By - @pythonnotes1
# Main Gameplay
while True:
    wn.update()
    if head.xcor() > 290 or head.xcor() < -290 or head.ycor() > 290 or head.ycor() < -290:
        time.sleep(1)
        head.goto(0, 0)
        head.direction = "Stop"
        colors = random.choice(['red', 'blue', 'green'])
        shapes = random.choice(['square', 'circle'])
        for segment in segments:
            segment.goto(1000, 1000)
        segments.clear()
        score = 0
        delay = 0.1
        pen.clear()
        pen.write("Score : {} High Score : {} ".format(
            score, high_score), align="center", font=("candara", 24, "bold"))
    if head.distance(food) < 20:
        x = random.randint(-270, 270)
        y = random.randint(-270, 270)
        food.goto(x, y)

        # Adding segment
        new_segment = turtle.Turtle()
        new_segment.speed(0)
        new_segment.shape("square")
        new_segment.color("orange")  # tail colour
        new_segment.penup()
        segments.append(new_segment)
        delay -= 0.001
        score += 10
        if score > high_score:
            high_score = score
        pen.clear()
        pen.write("Score : {} High Score : {} ".format(
            score, high_score), align="center", font=("candara", 24, "bold"))
    # Checking for head collisions with body segments
    for index in range(len(segments)-1, 0, -1):
        x = segments[index-1].xcor()
        y = segments[index-1].ycor()
        segments[index].goto(x, y)
    if len(segments) > 0:
        x = head.xcor()
        y = head.ycor()
        segments[0].goto(x, y)
    move()
    for segment in segments:
        if segment.distance(head) < 20:
            time.sleep(1)
            head.goto(0, 0)
            head.direction = "stop"
            colors = random.choice(['red', 'blue', 'green'])
            shapes = random.choice(['square', 'circle'])
            for segment in segments:
                segment.goto(1000, 1000)
            segments.clear()

            score = 0
            delay = 0.1
            pen.clear()
            pen.write("Score : {} High Score : {} ".format(
                score, high_score), align="center", font=("candara", 24, "bold"))
    time.sleep(delay)

wn.mainloop()

PythonNotes

18 Feb, 04:49


Code of this Project πŸ‘‡

https://technewsidea.com/animated-login-form-using-html-css-javascript/

PythonNotes

11 Feb, 05:07


---- Rose Source Code ----

import turtle

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

    # Flower base
    # by : @pythonnotes1
    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()