Python Programming Training Certification
Flexible Hours
100 Assignments
Instructor Led online Training
50 LMS Access
24X7 Support
100% Skill Level
Enquire Now
Course Overview
Python divmod() Function
Python divmod() function is used to get remainder and quotient of two numbers. This function takes two numeric arguments and returns a tuple. Both arguments are required and numeric. This function has the following syntax.
Signature
- divmod (number1, number2)
Parameters
<>number1: A numeric value, it is required.
<>number2: A numeric value, it is required.
Return
It returns a tuple.
Let’s see some examples of divmod() function to understand it’s functionality.
Python divmod() Function Example 1
Let’s see a simple example to call divmod() function.
-
# Python divmod() function example
# Calling function
result = divmod(10,2)
# Displaying result
print(result)
<>Output:
- (5, 0)
Python divmod() Function Example 2
It also allows passing float values as an argument. See an example below.
-
# Python divmod() function example
# Calling function
result = divmod(5.5,2.5)
# Displaying result
print(result)
<>Output:
- (2.0, 0.5)
Python divmod() Function Example 3
Here, we are passing the first argument as integer and second as a float value.
-
# Python divmod() function example
# Calling function
result = divmod(5.5,2)
# Displaying result
print(result)
<>Output:
- (2.0, 1.5)
Candidate’s Journey During Our Training Program
Expert’s Advice & Selection of Module
Choosing the right type of module for the training is half the battle & Our Team of experts will help & guide you.
Get Trained
Get Trained & Learn End to End Implementation from our Expert Trainer who are working on the same domain.
Work on Projects
We Do make our student’s work on multiple case studies , scenario based tasks & projects in order to provide real-time exposure to them.
Placements
We have a dedicated placement cell in order to provide placement assistance & relevant interviews to our candididates till selection
Placement Partner