Python Codes Basic to Advance
2.65K 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
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
Serialisation is also known as____________.
Anonymous Quiz
28%
Pickling
15%
Unpickling
33%
Continuation
24%
None of these
The file in which data are to be dumped, needs to be opened in _______________.
Anonymous Quiz
33%
Binary read mode
33%
Read mode
15%
Write mode
19%
Binary write mode
The following functions are used to access data randomly.
Anonymous Quiz
17%
Seek(), call()
25%
seek () ,tell()
45%
open() , readlines()
13%
tell() , read()
# Python list functions 👇
#1 len()
my_list = [1, 2, 3, 4, 5]
length = len(my_list)
print(length)
#2 list()
new_list = list(range(5))
print(new_list)