Which of the following functions is a built-in function in python?
Anonymous Quiz
7%
factorial()
79%
print()
4%
seed()
11%
sqrt()
Which of the following is the use of id() function in python?
Anonymous Quiz
12%
Every object doesnβt have a unique id
56%
Id returns the identity of the object
24%
All of the mentioned
7%
None of the mentioned
PythonProgrammingExercisesGentlyExplained.pdf
1.5 MB
Python Programming Exercises, 2022., gently explained
42 programming exercises on 160 pages with plain-English explanations
Exercise #1: Hello, World!
Exercise #2: Temperature Conversio
Exercise #3: Odd & Even
Exercise #4: Area & Volume
Exercise #5: Fizz Buzz
Exercise #6: Ordinal Suffix
Exercise #7: ASCII Table
Exercise #8: Read Write File
Exercise #9: Chess Square Color
Exercise #10: Find and Replace
Exercise #11: Hours, Minutes, Seconds
Exercise #12: Smallest & Biggest
Exercise #13: Sum & Product
Exercise #14: Average
Exercise #15: Median
Exercise #16: Mode
Exercise #17: Dice Roll
Exercise #18: Buy 8 Get 1 Free
Exercise #19: Password Generator
Exercise #20: Leap Year
And many more
βββββββββββββ
Join @python_bds to learn Python
*This channel belongs to @bigdataspecialist group
42 programming exercises on 160 pages with plain-English explanations
Exercise #1: Hello, World!
Exercise #2: Temperature Conversio
Exercise #3: Odd & Even
Exercise #4: Area & Volume
Exercise #5: Fizz Buzz
Exercise #6: Ordinal Suffix
Exercise #7: ASCII Table
Exercise #8: Read Write File
Exercise #9: Chess Square Color
Exercise #10: Find and Replace
Exercise #11: Hours, Minutes, Seconds
Exercise #12: Smallest & Biggest
Exercise #13: Sum & Product
Exercise #14: Average
Exercise #15: Median
Exercise #16: Mode
Exercise #17: Dice Roll
Exercise #18: Buy 8 Get 1 Free
Exercise #19: Password Generator
Exercise #20: Leap Year
And many more
βββββββββββββ
Join @python_bds to learn Python
*This channel belongs to @bigdataspecialist group
β€5π1
This python program can work with ____ parameters.
Anonymous Quiz
71%
any number of
9%
0
10%
1
10%
2
What will be the output of the following Python function?
min(max(False,-3,-4), 2,7)
min(max(False,-3,-4), 2,7)
Anonymous Quiz
10%
-4
15%
-3
22%
2
53%
False
π4π2
Which of the following is not a core data type in Python programming?
Anonymous Quiz
10%
Tuples
7%
Lists
70%
Class
14%
Dictionary
Which of these is the definition for packages in Python?
Anonymous Quiz
17%
A set of main modules
28%
A folder of python modules
26%
A number of files containing Python definitions and statements
30%
A set of programs making use of Python modules
π3
Just one "amendment" on previous image about Python features, which is created by some training institute of IT.
it states that Python is Fast and one of our members already pointed that out as an issue.
Actually Python is not really fast and that is the reason why for example my company is not using it (even though it would be much easier to create all those machine learning models that we are working on in Python). But since we are getting 4000 user generated request per second in a peak time, it's just not possible to handle that with Python.
But in most other cases Python is perfect because it's easy to use and intuitive, and you can do much more with less lines of code compared to most of the other programming languages. For example simple reading from file in python is just
it states that Python is Fast and one of our members already pointed that out as an issue.
Actually Python is not really fast and that is the reason why for example my company is not using it (even though it would be much easier to create all those machine learning models that we are working on in Python). But since we are getting 4000 user generated request per second in a peak time, it's just not possible to handle that with Python.
But in most other cases Python is perfect because it's easy to use and intuitive, and you can do much more with less lines of code compared to most of the other programming languages. For example simple reading from file in python is just
import pandas as pd
df = pd.read_csv('data.csv')
while in Java I would need much more lines of code.π5
What will be the output of the following Python function?
len(["hello",2, 4, 6])
len(["hello",2, 4, 6])
Anonymous Quiz
26%
Error
8%
6
56%
4
10%
3
π5β€2π1
What is the order of namespaces in which Python looks for an identifier?
Anonymous Quiz
42%
Python first searches the built-in namespace, then the global namespace and finally local namespace
31%
Python first searches the built-in namespace, then the local namespace and finally global namespace
17%
Python first searches the local namespace, then the global namespace and finally built-in namespace
10%
Python first searches the global namespace, then the local namespace and finally built-in namespace
What will be the output of the following Python code snippet?
for i in [1, 2, 3, 4][::-1]: print (i)
for i in [1, 2, 3, 4][::-1]: print (i)
Anonymous Quiz
63%
4 3 2 1
18%
Error
12%
1 2 3 4
7%
None
π2
What will be the output of the following Python statement?
>>>"a"+"bc"
>>>"a"+"bc"
Anonymous Quiz
4%
bc
91%
abc
3%
a
3%
bca
Which one of the following is not a keyword in Python language?
Anonymous Quiz
38%
pas
17%
eval
8%
assert
37%
nonlocal
π4π4
Python Learning
Which one of the following is not a keyword in Python language?
First answer should be pass instead of pas* it's a typo
π3
π3
What will be the output of the following Python program?
Anonymous Quiz
27%
Error
15%
None
34%
False
24%
True
π2