Python Codes Basic to Advance
2.66K subscribers
82 photos
5 videos
8 files
100 links
Python Codes Basic to Advance

All Codes
@C_Codes_pro
@CPP_Codes_pro
@Java_Codes_Pro
@nodejs_codes_pro

Discussion
@bca_mca_btech
Download Telegram
What is output of print(math.pow(3, 2))?
Anonymous Quiz
35%
9.0
42%
9
15%
None
8%
None of the mentioned
👍1
Output of this Python code 👇

>>> print (float( "11_11"))
Anonymous Quiz
51%
Error
33%
11.11
16%
1111.0
0%
1111
Read a file using python

Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
👍1
👍2
Python Codes Basic to Advance
Photo
import turtle as T
import time

T.setup(1000,800,0,0)
T.speed(0)
T.penup()
T.seth(90)
T.fd(340)
T.seth(0)
T.pendown()
T.speed(5)
T.begin_fill()
T.fillcolor('red')
T.circle(50,30)

for i in range(10):
T.fd(1)
T.left(10)
T.circle(40,40)

for i in range(6):
T.fd(1)
T.left(3)
T.circle(80,40)

for i in range(20):
T.fd(0.5)
T.left(5)
T.circle(80,45)

for i in range(10):
T.fd(2)
T.left(1)
T.circle(80,25)

for i in range(20):
T.fd(1)
T.left(4)
T.circle(50,50)

time.sleep(0.1)

T.circle(120,55)
T.speed(0)
T.seth(-90)
T.fd(70)
T.right(150)
T.fd(20)
T.left(140)
T.circle(140,90)
T.left(30)
T.circle(160,100)
T.left(130)
T.fd(25)
T.penup()
T.right(150)
T.circle(40,80)
T.pendown()
T.left(115)
T.fd(60)
T.penup()
T.left(180)
T.fd(60)
T.pendown()
T.end_fill()
T.right(120)
T.circle(-50,50)
T.circle(-20,90)
T.speed(1)
T.fd(75)
T.speed(0)
T.circle(90,110)
T.penup()
T.left(162)
T.fd(185)
T.left(170)
T.pendown()
T.circle(200,10)
T.circle(100,40)
T.circle(-52,115)
T.left(20)
T.circle(100,20)
T.circle(300,20)
T.speed(1)
T.fd(250)
T.penup()
T.speed(0)
T.left(180)
T.fd(250)
T.circle(-300,7)
T.right(80)
T.circle(200,5)
T.pendown()
T.left(60)
T.begin_fill()
T.fillcolor('green')
T.circle(-80,100)
T.right(90)
T.fd(10)
T.left(20)
T.circle(-63,127)
T.end_fill()
T.penup()
T.left(50)
T.fd(20)
T.left(180)
T.pendown()
T.circle(200,25)
T.penup()
T.right(150)
T.fd(180)
T.right(40)
T.pendown()
T.begin_fill()
T.fillcolor('green')
T.circle(-100,80)
T.right(150)
T.fd(10)
T.left(60)
T.circle(-80,98)
T.end_fill()
T.penup()
T.left(60)
T.fd(13)
T.left(180)
T.pendown()
T.speed(1)
T.circle(-200,23)
T.exitonclick()
👍32
Which of the following declarations is incorrect ?
Anonymous Quiz
22%
_x = 2
14%
__x = 3
26%
__xyz__ = 5
38%
None of these
In Python Programming 'def' is a :
Anonymous Quiz
67%
Function
30%
Keyword
2%
Class
#source
Convert Text to Speech
Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
1👍1
if realtionship=="about to breakup":
    try:
        print("Save Time🕐")
   except Exception as Ramdi:
        print(Ramdi)
   finally:
        print("Sucess achieved")

: https://t.me/addlist/2UhsQW_cGzkxMzg1
😁21👍1🖕1
image & audio Captcha generator using python...

https://t.me/addlist/2UhsQW_cGzkxMzg1
1
# built in api fetcher in Python
import urllib.request

url = input("Enter your api url: ")
# https://example.com


try:
with urllib.request.urlopen(url) as response:
data = response.read()
# Do something with the data here
print(data)
except urllib.error.URLError as e:
print("Error: please enter correct api url")
1
You know that you can create your own compiler bot

Just by sending your bot token in @fastCompiler_bot

See tutorial:
https://t.me/logicBots/174
Apple logo using python..
Python Codes Basic to Advance
Apple logo using python..
import turtle as t

t.begin_fill()
t.bgcolor('yellow')
t.fillcolor('black')
t.left(134)

for i in range(30):
t.forward(1)
t.left(1)

t.right(5)

for i in range(35):
t.forward(1)
t.left(1)

t.left(5)
t.forward(30)

for i in range(15):
t.forward(0.7)
t.right(3)

t.forward(25)
t.left(5)

for i in range(50):
t.forward(1)
t.left(1)

t.right(3)

for i in range(50):
t.forward(1)
t.left(1)

t.right(5)

for i in range(45):
t.forward(2)
t.left(1)

t.right(5)

for i in range(40):
t.forward(2)
t.left(1)

t.left(5)

for i in range(20):
t.forward(1)
t.left(2)

t.left(5)
t.forward(15)

for i in range(9):
t.forward(2)
t.right(3)

t.forward(1)

for i in range(15):
t.forward(1)
t.right(1)

t.right(4)
t.forward(4.5)
t.right(1)

for i in range(27):
t.forward(1)
t.left(2)

t.left(8)
t.forward(5)

for i in range(25):
t.forward(2)
t.left(1)

t.right(3)
t.forward(10)
t.left(83)

for i in range(75):
t.forward(1.3)
t.right(1)

t.right(4)

for i in range(24):
t.forward(1.3)
t.right(1)

t.forward(9.66)
t.end_fill()
t.penup()
t.left(132)
t.forward(100)
t.right(96)
t.pendown()
t.begin_fill()
t.fillcolor('black')

for i in range(60):
t.forward(0.8)
t.right(1)

t.right(120)

for i in range(60):
t.forward(0.8)
t.right(1)

t.hideturtle()
t.end_fill()

t.done()
2👍2
Which method is used to find the name of the current working directory in Python?
Anonymous Quiz
19%
cwd()
37%
dir()
24%
getcwd()
20%
fname()
How many parameters one can pass in open() method in python?
Anonymous Quiz
40%
1
33%
2
15%
3
13%
0
👍1