Ultimate Python Cheatsheet 🔥.pdf
2.3 MB
هر روز یک Cheat Sheet
برگه تقلب شماره 14 پایتون
Cheat Sheet 14 : Ultimate Python cheat sheet
#cheat_sheet #pdf
🆔 @Python4all_pro
برگه تقلب شماره 14 پایتون
Cheat Sheet 14 : Ultimate Python cheat sheet
#cheat_sheet #pdf
🆔 @Python4all_pro
😍6
What is the output of the program?
Anonymous Quiz
8%
0-0-5
7%
1-2-10
8%
2-1-5
49%
2-0-5
4%
3-1-10
4%
3-2-6
20%
Error
👍5
Pattern 17
#code #pattern
🆔 @Python4all_pro
n = 7
for i in range(7):
if i % 2 == 0:
print("*", end=" ")
else:
print("#", end=" ")
#code #pattern
🆔 @Python4all_pro
👍5🏆3❤1
What is the output of the code?
Anonymous Quiz
39%
true
9%
false
10%
true false
18%
Error will occur in line 1
12%
Error will occur in line 3
2%
Error will occur in line 4
11%
None of the above
👍9👾3
Pattern 18
#code #pattern
🆔 @Python4all_pro
n = 7
for i in range(7):
if i % 3 == 2:
print("@", end=" ")
elif i % 3 == 1:
print("#", end=" ")
else:
print("*", end=" ")
#code #pattern
🆔 @Python4all_pro
👍7❤🔥3🤷♂1
کتابخانه های پایتون مجموعه ای از توابع مفید هستند که نیاز به نوشتن کد های اضافی را حذف می کنند و همین ویژگی ها هستند که پایتون را جذاب تر می کند. تعداد کتابخانه های پایتون بسیار بسیار زیاد است؛ بیش از 137000 کتابخانه پایتون وجود دارد. کتابخانه ها نقش حیاتی در توسعه یادگیری ماشین، علم داده، برنامه های کاربردی نظیر پردازش تصویر و داده و موارد دیگر ایفا می کنند.
#کتابخانه
#library
🆔 @Python4all_pro
#کتابخانه
#library
🆔 @Python4all_pro
🆒9👍6
Pattern 19
#code #pattern
🆔 @Python4all_pro
n = 7
for i in range(1, n+1):
if i % 2 == 0:
print("$", end=" ")
else:
print(i, end=" ")
#code #pattern
🆔 @Python4all_pro
👍10
What will be the output of the following Python code?
Anonymous Quiz
11%
0.0 0.1 0.2 0.3 …
26%
0 1 2 3 …
13%
0.0 1.0 2.0 3.0 …
51%
none of the mentioned
👍8
Pattern 20
#code #pattern
🆔 @Python4all_pro
n = 7
for i in range(1, n+1):
if i % 2 == 0:
print(i**2, end=" ")
else:
print("*", end=" ")
#code #pattern
🆔 @Python4all_pro
👍1😍1
🔅 Merge PDFs
@Python4all_pro
pip install PyPDF2
from PyPDF2 import PdfFileMerger
def by_appending():
merger = PdfFileMerger()
# Either provide file stream
f1 = open("samplePdf1.pdf", "rb")
merger.append(f1)
# Or direct file path
merger.append("samplePdf2.pdf")
merger.write("mergedPdf.pdf")
# By inserting at after an specified page no.
def by_inserting():
merger = PdfFileMerger()
merger.append("samplePdf1.pdf")
merger.merge(0, "samplePdf2.pdf")
merger.write("mergedPdf1.pdf")
if __name__ == "__main__":
by_appending()
by_inserting()
@Python4all_pro
👍11😍1👾1