Free Python Courses, Books and Cheat Sheets (part 2)
Additional materials
Books
A list of Python books in English that are free to read online or download
Learn Python the Hard Way
Python for Everybody
Automate The Boring Stuff With Python
Python 3 Patterns, Recipes and Idioms
Clean Architectures in Python
python intro notes
An introduction to Python for absolute beginners
python programming notes
Python Data Science Handbook
Cheat sheets
Python Tutorial -> Condensed Cheatsheet
Python Programming Exercises, 2022., gently explained
python matplotlib
python panda
python basics
python seaborn
Useful Python for data science cheat sheets
python data type cheat sheet
python cheat sheets
GitHub Repositories
Machine Learning University: Accelerated Natural Language Processing Class
Hands on ML notebook series
Machine learning cheat sheet with code
#python #python3
ββββββββββββββ
πJoin @bigdataspecialist for moreπ
Additional materials
Books
A list of Python books in English that are free to read online or download
Learn Python the Hard Way
Python for Everybody
Automate The Boring Stuff With Python
Python 3 Patterns, Recipes and Idioms
Clean Architectures in Python
python intro notes
An introduction to Python for absolute beginners
python programming notes
Python Data Science Handbook
Cheat sheets
Python Tutorial -> Condensed Cheatsheet
Python Programming Exercises, 2022., gently explained
python matplotlib
python panda
python basics
python seaborn
Useful Python for data science cheat sheets
python data type cheat sheet
python cheat sheets
GitHub Repositories
Machine Learning University: Accelerated Natural Language Processing Class
Hands on ML notebook series
Machine learning cheat sheet with code
#python #python3
ββββββββββββββ
πJoin @bigdataspecialist for moreπ
GitHub
GitHub - pamoroso/free-python-books: Python books free to read online or download
Python books free to read online or download. Contribute to pamoroso/free-python-books development by creating an account on GitHub.
π1
Which of the following statement prints hello\example\test.txt?
Anonymous Quiz
43%
print(βhello\example\test.txtβ)
43%
print(βhello\\example\\test.txtβ)
8%
print(βhello\βexample\βtest.txtβ)
7%
print(βhelloβ\exampleβ\test.txtβ)
π1
The format function, when applied on a string returns ___________
Anonymous Quiz
28%
Error
9%
imt
10%
bool
53%
str
What will be the output of the βhelloβ +1+2+3?
Anonymous Quiz
39%
hello123
8%
hello
39%
Error
14%
hello6
What will be displayed by print(ord(βbβ) β ord(βaβ))?
Anonymous Quiz
18%
0
57%
1
22%
-1
3%
2
π5β€1
Say s=βhelloβ what will be the return value of type(s)?
Anonymous Quiz
4%
int
9%
bool
59%
str
28%
String
π4
To retrieve the character at index 3 from string s=βHelloβ what command do we execute (multiple answers allowed)?
Anonymous Quiz
18%
s[]
36%
s.getitem(3)
26%
s.__getitem__(3)
20%
s.getItem(3)
β€1
To return the length of string s what command do we execute?
Anonymous Quiz
44%
len(s) OR s.__len__()
43%
len(s) only
7%
size(s)
7%
s.size()
π1
Explanation:
len(s) is a built-in function in Python to get the length of the string s, whereas s.len() calls the len method of the string object s. Itβs less common but functionally equivalent to len(s). So, we can use either of these.
len(s) is a built-in function in Python to get the length of the string s, whereas s.len() calls the len method of the string object s. Itβs less common but functionally equivalent to len(s). So, we can use either of these.
To check whether string s1 contains another string s2, use ________
Anonymous Quiz
30%
s1.__contains__(s2)
32%
s2 in s1
32%
s1.contains(s2)
6%
si.in(s2)
π4
What will be the output of the following Python code?
print("abc DEF".capitalize())
print("abc DEF".capitalize())
Anonymous Quiz
7%
abc def
59%
ABC DEF
20%
Abc def
14%
Abc Def
What will be the output of the following Python code?
print("abc. DEF".capitalize())
print("abc. DEF".capitalize())
Anonymous Quiz
7%
abc. def
38%
ABC. DEF
32%
Abc. def
22%
Abc. Def
π€―2
What will be the output of the following Python code?
print("abcdef".center())
print("abcdef".center())
Anonymous Quiz
43%
cd
23%
abcde
24%
error
9%
none
β€3π1
What will be the output of the following Python code?
print("abcdef".center(0))
print("abcdef".center(0))
Anonymous Quiz
27%
cd
26%
abcdef
34%
error
12%
None
What will be the output of the following Python code?
print('*', "abcdef".center(7), '*')
print('*', "abcdef".center(7), '*')
Anonymous Quiz
37%
* abcdef *
46%
*abcdef *
17%
* abcdef*
What will be the output of the following Python code?
print('*', "abcdef".center(7), '*', sep='')
print('*', "abcdef".center(7), '*', sep='')
Anonymous Quiz
32%
* abcdef *
35%
* abcdef *
21%
*abcdef *
12%
* abcdef*
β€1
What will be the output of the following Python code?
print("abcdef".center(7, 1))
print("abcdef".center(7, 1))
Anonymous Quiz
23%
1abcdef
40%
abcdef1
12%
abcdef
25%
error
π2
What will be the output of the following Python code?
print("abcdef".center(7, '1'))
print("abcdef".center(7, '1'))
Anonymous Quiz
18%
1abcdef
43%
abcdef1
8%
abcdef
31%
error
π2
What will be the output of the following Python code?
print("abcdef".center(10, '12'))
print("abcdef".center(10, '12'))
Anonymous Quiz
43%
12abcdef12
21%
abcdef1212
12%
1212abcdef
23%
error
π€―2
What will be the output of the following Python code?
print("xyyzxyzxzxyy".count('yy'))
print("xyyzxyzxzxyy".count('yy'))
Anonymous Quiz
62%
2
8%
0
25%
error
5%
none
π3