Python Programming
Python is one of the most popular programming languages on the planet. It was created by Guido van Rossum and was first released in 1991. Python has many uses like building websites and software, automate tasks, creating artificial intelligence, building machine learning applications and many more. It is a general-purpose language. It can be used to create a variety of different programs and isn’t specialized for any specific problems.
Take this assessment to test your knowledge on one of the best Programming Language. Click Rewards tab for eligibility requirements.
Read FAQs tab carefully for Instructions before beginning the assessment.
NYXPoints are used to generate the Leaderboard (coming soon). They are awarded for achieving a certain score.
- 200 nyxpoints for a passing score of 80% or more
- 300 nyxpoints for a perfect score of 100%
- Didn’t pass? You still get 30 nyxpoints for attempting the assesment
IMPORTANT instructions for taking the Assessment
- The timer starts when you click Start Assessment
- DO NOT refresh/reload the page or use the back button to navigate away from the page.
- Navigating away from the assessment page DOES NOT stop/pause the timer and the will restart the assessment when you come back to it. The answers are NOT saved.
General
- There are NO pre-requisites to take this assessment. Take this assessment even if you are completely new to Linux.
- The assessment is completely FREE.
- Preferably take it in a closed book mode.
- DO NOT copy/paste, share or upload questions elsewhere.
Eligible Rewards
300 NyxCoins*
* NyxCoins vary on score
Assessment Summary
0 of 30 Questions completed
Questions:
Information
You have already completed the assessment before. Hence you can not start it again.
Assessment is loading…
You must sign in or sign up to start the assessment.
You must first complete the following:
Results
Results
0 of 30 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 30
1. Question
What method will you use to remove an item from a list?
CorrectIncorrect -
Question 2 of 30
2. Question
What is the time complexity to access an item from a dictionary in Python?
CorrectIncorrect -
Question 3 of 30
3. Question
You have to define a class Baleno which inherits from a parent class Car. Choose the correct syntax.
CorrectIncorrect -
Question 4 of 30
4. Question
What does the all() function in Python do?
CorrectIncorrect -
Question 5 of 30
5. Question
What is the default sorting algorithm used by Python?
CorrectIncorrect -
Question 6 of 30
6. Question
What will be the output of the following code?
countries = [ “India”, “USA”, “China” ]
population = [ 1401, 330, 1412 ]
gdp = [ 3.5, 21, 18 ]
i=0
result = []
for country in countries:
count_name = countries[i]
count_pop = population[i]
count_gdp = gdp[i]
result.append( ( count_name, count_pop, count_gdp ) )
i+=1
print( result )
CorrectIncorrect -
Question 7 of 30
7. Question
What is the correct way to define __init__ method without any parameters?
CorrectIncorrect -
Question 8 of 30
8. Question
Refer the given code below. What will be the length of the resulting list? ( m & n are positive integers )
res = []
for i in range(m):
for j in range(n):
res.append(j)
CorrectIncorrect -
Question 9 of 30
9. Question
Which of the following can be mutated in-place in Python? (Multiple Choice)
CorrectIncorrect -
Question 10 of 30
10. Question
Which method will give you access of all the keys in a dictionary?
CorrectIncorrect -
Question 11 of 30
11. Question
Which modes can be used to access a file using Python script? (Multiple Choice)
CorrectIncorrect -
Question 12 of 30
12. Question
What would be the output of this code?
s = “one;two;three;”
t = s.split(‘;’)
print( len(t) )
CorrectIncorrect -
Question 13 of 30
13. Question
If a class inherits from two parent classes then which of the following statements will be true about the object created from the child class?
CorrectIncorrect -
Question 14 of 30
14. Question
Select the correct difference between instance and class variables.
CorrectIncorrect -
Question 15 of 30
15. Question
A python source code is given below; it is stored as a file and we are not able to execute it directly on a Linux machine.
print(“Welcome to Online Quiz Portal !”)
What changes should we make to our file to ensure that it runs?
CorrectIncorrect -
Question 16 of 30
16. Question
Which of the following is correct statement?
CorrectIncorrect -
Question 17 of 30
17. Question
What will be the output of the following comprehension?
{ i: i**2 for i in range(1, 6) }
CorrectIncorrect -
Question 18 of 30
18. Question
Which of the following is not a use of python’s sys library?
CorrectIncorrect -
Question 19 of 30
19. Question
How do you install additional packages in Python?
CorrectIncorrect -
Question 20 of 30
20. Question
Elements surrounded by [] , {}, and () are ____, ____, and ____ respectively.
CorrectIncorrect -
Question 21 of 30
21. Question
Which of the following Python mechanism should be used to tell a user that they are using a deprecated function?
CorrectIncorrect -
Question 22 of 30
22. Question
When would you use a try/except block?
CorrectIncorrect -
Question 23 of 30
23. Question
Which Python function is used to execute Linux shell commands?
CorrectIncorrect -
Question 24 of 30
24. Question
Which among the following Python library can be used to create Graphical User Interface?
CorrectIncorrect -
Question 25 of 30
25. Question
To replace a part of the string which method is used?
CorrectIncorrect -
Question 26 of 30
26. Question
What is the correct way to define a function in Python?
CorrectIncorrect -
Question 27 of 30
27. Question
Which method in dictionary removes the last inserted key-value pair?
CorrectIncorrect -
Question 28 of 30
28. Question
Which of the following datatype doesn’t use slicing to extract a subsection of the collection ?
CorrectIncorrect -
Question 29 of 30
29. Question
Which of the following statement defines lambda function in Python?
CorrectIncorrect -
Question 30 of 30
30. Question
______________ block in exception handling will always be executed, whether the try block raises an error or not.
CorrectIncorrect