Python learning
27.2K subscribers
209 photos
8 videos
75 files
118 links
Learn pythonπŸ”₯
Quality content πŸ˜‰
Get Python Course 😁
Download Telegram
PYTHON PROJECT FOR πŸ‘¨πŸΌβ€πŸ’»πŸ‘¨πŸΌβ€πŸ’»
Create Graphical User Interfaces with Python.pdf
11.3 MB
βœ… Book : Create Graphical User  Interfaces with Python – How to build windows, buttons, and widgets for your Python projects

βœ… Download now πŸš€
Python learning:
import turtle
a=turtle.Turtle()
a.getscreen().bgcolor("black")
a.penup()
a.goto(-200, 100)
a.pendown()
a.color("yellow")
a.speed(25)
def star(turtle, size):
    if size<=10:
        return
    else:
        turtle.begin_fill()
        for i in range (5):
            turtle.pensize(2)
            turtle.forward(size)
            star(turtle, size/3)
            turtle.left(216)
            turtle.end_fill()
star(a, 360)
turtle.done()
Run this Code and send output screenshot
Website Which will teach you for freeπŸ™ŒπŸ»πŸ™ŒπŸ»πŸ™ŒπŸ»πŸ™ŒπŸ»
Creators of programming language πŸ™ŒπŸ»πŸ™ŒπŸ»πŸ™ŒπŸ»
Which of the following character is
used to give single-line comments in
Python?
Anonymous Quiz
25%
//
61%
#
4%
!
11%
/*
Turtle Clock.txt
3.6 KB
Code file for Clock program
COMPANIES THAT DONT ASK FOR DEGREEπŸ™ŒπŸ»πŸ™ŒπŸ»πŸ™ŒπŸ»πŸ™ŒπŸ»
Which one of the following is not a
keyword in Python language?
Anonymous Quiz
29%
eval
9%
pass
9%
def
54%
nonlocal
5_6125174816421970019.pdf
416.5 KB
TCS Important Interview Preparation Questions
from turtle import *

speed(0)
bgcolor('black')
color('orange')
hideturtle()

n = 1
p = True

while True:
circle(n)
if p:
n = n - 1
else:
n = n + 1

if n == 0 or n == 60:
p = not p

left(1)
forward(3)

done()
Run this Code and send output screenshot
Remove Background Using Python πŸ”₯πŸ™ŒπŸ»
What will be the output of this
function?
>>round (4.576)
Anonymous Quiz
27%
4
7%
576
29%
4.6
37%
5
from turtle import *
import turtle
turtle.bgcolor('black')
turtle.pencolor('red')
turtle.hideturtle()
turtle.speed()
#curve01
def curve01(a,d):
for i in range(d):
turtle.right(a)
turtle.forward(1)

#making eye
turtle.width(15)
turtle.penup()
turtle.right(90)
turtle.forward(85)
turtle.left(90)
turtle.forward(35)
turtle.pendown()
turtle.fillcolor('white')
turtle.begin_fill()
turtle.left(55)
curve01(0.09,100)
curve01(0.2,100)
turtle.forward(70)
turtle.right(90)
curve01(0.5,100)
curve01(00,30)
curve01(0.3,50)
curve01(0.6,50)
turtle.forward(50)
turtle.right(47)
curve01(0.1,95)
turtle.end_fill()

#changing
turtle.penup()
turtle.left(36)
turtle.forward(70)
turtle.pendown()

#curve02
def curve02(a,d):
for i in range(d):
turtle.left(a)
turtle.forward(1)

#second eye
turtle.fillcolor('white')
turtle.begin_fill()
turtle.right(55)
curve02(0.09,100)
curve02(0.2,100)
turtle.forward(70)
turtle.left(90)
curve02(0.5,100)
curve02(00,30)
curve02(0.3,50)
curve02(0.6,50)
turtle.forward(50)
turtle.left(47)
curve02(0.1,95)
turtle.end_fill()

turtle.penup()
turtle.width(0)
turtle.right(49)
turtle.forward(30)
turtle.left(102) #100.40
turtle.forward(145)
turtle.pencolor('red')


#making left face
turtle.fillcolor('red')
turtle.begin_fill()
turtle.speed()
turtle.pendown()
turtle.left(90)
curve01(5,20)
turtle.left(175)
turtle.forward(50)
turtle.left(25)
turtle.forward(28)
turtle.right(160)
turtle.forward(170)
curve02(0.2,65)
turtle.right(60)
curve01(0.1,140)
curve01(0.5,50)
turtle.left(180)
curve02(0.2,150)
curve02(0.1,95)
turtle.left(127)
turtle.forward(5)
curve01(2,20)
turtle.right(30)
turtle.forward(90)
turtle.right(7)
turtle.forward(75)
turtle.right(160)
turtle.forward(100)
curve02(0.1,105)
turtle.right(70)
curve01(0.2,200)
curve01(0.3,70)
turtle.left(175)
curve02(0.2,150)
curve02(0.3,150)
turtle.forward(20)
turtle.left(65)
curve01(0.1,120)
curve01(0.010,105)
turtle.right(10)
curve01(0.2,110)
turtle.right(60)
curve01(0.3,138)
turtle.right(30)
curve01(0.2,160)
turtle.left(150)
curve02(0.2,100)
curve02(0.1,150)
turtle.forward(70)
curve02(0.4,40)
turtle.left(160)
curve01(0.1,60)
turtle.left(7)
curve01(0.1,120)
curve01(0.2,30)
turtle.forward(20)
turtle.right(140)
curve02(0.2,40)
turtle.right(50)
curve02(0.2,70)
turtle.right(8)
curve02(0.1,70)
curve02(0.5,50)
turtle.left(153)
curve01(0.1,170)
turtle.right(81)
curve02(0.2,20)
turtle.right(3)
curve02(0.1,62)
turtle.right(153) #..
curve01(0.1,63)
turtle.left(50)
curve02(0.1,175)
turtle.left(60)
turtle.forward(7)
turtle.end_fill()


#going to replicate
turtle.left(92.15)
turtle.penup()
turtle.forward(417)
turtle.pendown()

turtle.fillcolor('red')
turtle.begin_fill()
#right face
turtle.right(90)
curve02(5,20)
turtle.right(175)
turtle.forward(50)
turtle.right(25)
turtle.forward(28)
turtle.left(160)
turtle.forward(170)
curve01(0.2,65)
turtle.left(60)
curve02(0.1,140)
curve02(0.5,50)
turtle.right(180)
curve01(0.2,150)
curve01(0.1,95)
turtle.right(127)
turtle.forward(5)
curve02(2,20)
turtle.left(30)
turtle.forward(90)
turtle.left(7)
turtle.forward(75)
turtle.left(160)
turtle.forward(100)
curve01(0.1,105)
turtle.left(70)
curve02(0.2,200)
curve02(0.3,70)
turtle.right(175)
curve01(0.2,150)
curve01(0.3,150)
turtle.forward(20)
turtle.right(65)
curve02(0.1,120)
curve02(0.010,105)
turtle.left(10)
curve02(0.2,110)
turtle.left(60)
curve02(0.3,138)
turtle.left(30)
curve02(0.2,160)
turtle.right(150)
curve01(0.2,100)
curve01(0.1,150)
turtle.forward(70)
curve01(0.4,40)
turtle.right(160)
curve02(0.1,60)
turtle.right(7)
curve02(0.1,120)
curve02(0.2,30)
turtle.forward(20)
turtle.left(140)
curve01(0.2,40)
turtle.left(50)
curve01(0.2,70)
turtle.left(8)
curve01(0.1,70)
curve01(0.5,50)
turtle.right(153)
curve02(0.1,170)
turtle.left(81)
curve01(0.2,20)
turtle.left(3)
curve01(0.1,62)
turtle.left(153) #..
curve02(0.1,63)
turtle.right(50)
curve01(0.1,100) #0.1
turtle.forward(75)
turtle.right(75)
turtle.forward(2)
turtle.end_fill()
turtle.done()