Python Codes Basic to Advance
Open in Telegram
Python Codes Basic to Advance All Codes @C_Codes_pro @CPP_Codes_pro @Java_Codes_Pro @nodejs_codes_pro Discussion @bca_mca_btech
Show more2 813
Subscribers
No data24 hours
-47 days
-2430 days
Posts Archive
#6 sorted()
my_list4 = [16, 17, 18, 19, 20]
sorted_list = sorted(my_list4)
print(sorted_list)#5 sum()
my_list3 = [11, 12, 13, 14, 15]
total = sum(my_list3)
print(total)#4 min()
my_list2 = [6, 7, 8, 9, 10]
min_value = min(my_list2)
print(min_value)#3 max()
my_list1 = [1, 2, 3, 4, 5]
max_value = max(my_list1)
print(max_value)#1 len()
my_list = [1, 2, 3, 4, 5]
length = len(my_list)
print(length)String functions in Python
https://t.me/Python_Codes_Pro/86
String Codes
https://t.me/Python_Codes_Pro/98
Are you added coding folder? 👇
https://t.me/addlist/2UhsQW_cGzkxMzg1
The following functions are used to access data randomly.
The file in which data are to be dumped, needs to be opened in _______________.
How many parameters one can pass in open() method in python?
Which method is used to find the name of the current working directory in 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()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
# 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
image & audio Captcha generator using python...
https://t.me/addlist/2UhsQW_cGzkxMzg1
