Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs
319 subscribers
70 photos
3 videos
3 files
33 links
👩‍💻 Wᴇʟᴄᴏᴍᴇ ᴛᴏ @CodesSnippet! 🚀

Jᴏɪɴ ᴜs ғᴏʀ ᴅᴀɪʟʏ sɴɪᴘᴘᴇᴛs ᴏғ ᴄᴏᴅɪɴɢ 🧩 ᴋɴᴏᴡʟᴇᴅɢᴇ! 💻💡

Hᴇʀᴇ, ʏᴏᴜ'ʟʟ ғɪɴᴅ 👀 ʙɪᴛᴇ-sɪᴢᴇᴅ ᴘɪᴇᴄᴇs ᴏғ ᴄᴏᴅᴇ, 🔥 ᴘʀᴏɢʀᴀᴍᴍɪɴɢ ᴛɪᴘs, ᴀɴᴅ ᴛʀɪᴄᴋs ᴛᴏ ʟᴇᴠᴇʟ ᴜᴘ ʏᴏᴜʀ ᴄᴏᴅɪɴɢ sᴋɪʟʟs! 💪💻

Sᴛᴀʏ ᴜᴘᴅᴀᴛᴇᴅ ᴏɴ ᴛʜᴇ ʟᴀᴛᴇsᴛ ᴛʀᴇɴᴅs ɪɴ ᴛᴇᴄʜ
Download Telegram
a = {():[]}
print(type(a))
b = {[]:()} print(type(b))
Anonymous Quiz
18%
dict, dict
45%
dict, TypeError
28%
TypeError, dict
10%
TypeError, TypeError
a = [3, 2, 3]
print(len(set(a)))
Anonymous Quiz
15%
1
35%
3
33%
2
17%
valueError
👍2
Guess The Output?

my_list = [True, False, True, None, True]; print(any(my_list)); print(all(my_list))
Anonymous Quiz
7%
None , None
24%
Error
29%
False , True
31%
True , False
10%
True , True
Tip : Use the zip() function to iterate over multiple iterables simultaneously

Example:

# Create two lists
names = ["John", "Mary", "Bob"]
ages = [30, 25, 40]

# Iterate over both lists using zip()
for name, age in zip(names, ages):
print(f"{name} is {age} years old.")

Benefits:

* Simplifies the process of iterating over multiple lists or tuples
* Ensures that the elements from corresponding lists are aligned

Language: Python
Jᴏɪɴ ᴜs :- @CodesSnippet
for(var i=0; i<5; i++) {
setTimeout(() => {
console.log(i); }); }
Anonymous Quiz
22%
0, 1, 2, 3, 4
22%
1, 2, 3, 4, 5
27%
0, 0, 0, 0, 0
18%
5, 5, 5, 5, 5
10%
Invalid dataType
👍1
for(let i=0; i<5; i++) {
setTimeout(() => {
console.log(i); }); }
Anonymous Quiz
16%
0, 0, 0, 0, 0
25%
0, 1, 2, 3, 4
35%
1, 2, 3, 4, 5
18%
5, 5, 5, 5, 5
6%
ValueError
print(not None);
Anonymous Quiz
41%
True
23%
False
18%
None
18%
Error
print(not print())
Anonymous Quiz
50%
Error
29%
None
21%
True
Python Logo Source Code

import turtle

t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor("black")
t.speed(10)
t.pensize(2)
t.pencolor("white")



def s_curve():
for i in range(90):
t.left(1)
t.forward(1)

def r_curve():
for i in range(90):
t.right(1)
t.forward(1)

def l_curve():
s_curve()
t.forward(80)
s_curve()

def l_curve1():
s_curve()
t.forward(90)
s_curve()

def half():
t.forward(50)
s_curve()
t.forward(90)
l_curve()
t.forward(40)
t.left(90)
t.forward(80)
t.right(90)
t.forward(10)
t.right(90)
t.forward(120) #on test
l_curve1()
t.forward(30)
t.left(90)
t.forward(50)
r_curve()
t.forward(40)
t.end_fill()

def get_pos():
t.penup()
t.forward(20)
t.right(90)
t.forward(10)
t.right(90)
t.pendown()

def eye():
t.penup()
t.right(90)
t.forward(160)
t.left(90)
t.forward(70)
t.pencolor("black")
t.dot(35)

def sec_dot():
t.left(90)
t.penup()
t.forward(310)
t.left(90)
t.forward(120)
t.pendown()

t.dot(35)




t.fillcolor("#306998")
t.begin_fill()
half()
t.end_fill()
get_pos()
t.fillcolor("#FFD43B")
t.begin_fill()
half()
t.end_fill()

eye()
sec_dot()



def pause():
t.speed(2)
for i in range(100):
t.left(90)
pause()

Language: Python
Jᴏɪɴ ᴜs :- @CodesSnippet
👍1
😁2🕊1
Guess the Output?
Forwarded from Python Codes Basic to Advance (</> Mᴜᴋᴇsʜ </>)
📽 Web Automation and Scraping using Python - Udemy

By: @Python_Codes_Pro

More likes => more courses 🫶

Courses link :- https://t.me/Python_Codes_Pro/434
1
👾
# Generate AI image with the input text

pip install --upgrade MukeshAPI



from MukeshAPI import api
response = api.ai_image("cute boy pic")
#print(response)
with open("mukesh.jpg", 'wb') as f:
f.write(response)
print("image generated successfully")


By : @mr_sukkun

for more visit : https://pypi.org/project/MukeshAPI/
1
Forwarded from Python Codes Basic to Advance (</> Mᴜᴋᴇsʜ </>)
x=[1,2,3];y=[1,2,3];print(x is y)
Anonymous Quiz
68%
True
25%
False
7%
None
🕊1👀1
console.log(0 === false);
console.log(Object.is(0, false));
Anonymous Quiz
41%
false, false
21%
true, true
26%
true, false
13%
false, true