Python Programming
This assessment consists of 20 multiple-choice questions related to Python programming. The questions cover a range of topics, including data types, lists, tuples, dictionaries, functions, control flow, and built-in functions. Each question has four answer options, with only one option being correct. The purpose of this assessment is to test the candidate's knowledge of Python programming and their ability to apply that knowledge to solve problems.
1. Which of the following is a valid identifier in Python?
A. 2name
B. _name
C. -name
D. name%
Your answer:
2. What is the output of the following code?
print(""5"" + 3)
A. 8
B. 53
C. "53"
D. TypeError: can only concatenate str (not "int") to str
Your answer:
3. Which of the following is a mutable data type in Python?
A. int
B. tuple
C. list
D. str
Your answer:
4. What is the output of the following code?
x = [1, 2, 3]
y = x
y.append(4)
print(x)
A. [1, 2, 3, 4]
B. [1, 2, 3]
C. [1, 2, 3, [4]]
D. TypeError: 'tuple' object does not support item assignment
Your answer:
5. What is the output of the following code?
print(""Hello World""[::-1])
A. dlroW olleH
B. HelloWorld
C. dlroW olleH
D. TypeError: 'tuple' object does not support item assignment
Your answer:
6. What is the correct way to import the math module in Python?
A. import Math
B. import math as m
C. from Math import *
D. from math import pi
Your answer:
7. What is the output of the following code?
for i in range(3):
print(i)
A. 0 1 2
B. 1 2 3
C. 0 1 2 3
D. 3 2 1 0
Your answer:
8. What is the output of the following code?
x = 5
if x < 5:
print(""x is less than 5"")
elif x > 5:
print(""x is greater than 5"")
else:
print(""x is equal to 5"")
A. x is less than 5
B. x is greater than 5
C. x is equal to 5
D. None of the above
Your answer:
9. What is the output of the following code?
x = [1, 2, 3]
y = [1, 2, 3]
print(x == y)
print(x is y)
A. True True
B. True False
C. False True
D. False False
Your answer:
10. Which of the following is a built-in function in Python to read input from the user?
A. input()
B. read()
C. get_input()
D. get()
Your answer:
Related Courses
PTN-108: Advanced Python Scripting
RM4,000.00
ILT/VILT
This 5-days Advanced Python Scripting training covers the language references, explains object-oriented as well as functional programming techniques, error handling, modules, many of the Python libraries, and best practices. All concepts are explained through hands-on examples and exercises. The participants would be learning by doing. Even though the name of this Python course is Advanced Python Scripting, it covers from basic to advanced.
Training Duration: 5 Days
Minimum private group training class: 5 Participants
- Certificate Of Completion Available
- Group Private Class
- VILT Class Available
- SBL-Khas Claimable
Related training:
- Python Essentials
- Python Programming
- Data Science With Python
- PTN-107: Artificial Intelligence, Data Science and Machine Learning with Python
For Technical Finance:
Limited time offer: Sign-up for a private session with a min headcount of 10-pax and entitled for a complimentary 1-day Microsoft Excel training (max 20-pax).
For more details, may check out the entire series and blogs at Learn Python with GemRain. Learn Python today.
PTN-111: Python For Power User
RM4,000.00
ILT/VILT
This Python for Power User training course is designed for individuals who already have experience writing simple Python scripts and want to learn how to develop more advanced scripts using features such as file operations, regular expressions, binary data, and Python modules.
The course covers classes in greater detail and also provides coverage of OS services, date/time management, unit testing, database connectivity, network programming, web programming with Django, and more.
This Python course is hands-on and includes practical exercises, solutions, and code examples.
Training Duration: 5 Days
- Certificate Of Completion Available
- Group Private Class
- VILT Class Available
- SBL-Khas Claimable
Python Essentials
RM3,500.00
ILT/VILT
Python is a programming language that lets you work quickly and integrate systems more effectively. Whether you’re new to programming or an experienced developer, it’s easy to learn and use Python.
Learn features, advanced functionalities, unit testing and more in this extensive Python training course.
Training Duration: 5 Days
Minimum private group training class: 5 Participants
- Certificate Of Completion Available
- Group Private Class
- VILT Class Available
- SBL-Khas Claimable
Related training:
For more details, may check out the entire series and blogs at Learn Python with GemRain
Python Programming
RM3,500.00
ILT/VILT
Python is a powerful general-purpose programming language. It is used in web development, data science, creating software prototypes, and so on. Fortunately for beginners, Python has simple easy-to-use syntax. This makes Python an excellent language to learn to program for beginners.
This Basic to Intermediate Python training course emphasis the core libraries and most useful libraries developed by Python. Learn Python Programming today.
Training Duration: 5 Days
Minimum private group training class: 5 Participants
- Certificate Of Completion Available
- Group Private Class
- VILT Class Available
- SBL-Khas Claimable
Related training:
- Python Essentials
- Data Science With Python
- PTN-107: Artificial Intelligence, Data Science and Machine Learning with Python
- PTN-108: Advanced Python Scripting
For Technical Finance:
For more details, may check out the entire series and blogs at Learn Python with GemRain