Skip to main content
Practice

Coding Quiz

This coding quiz requires the use of Python's integer division operator //. The task is to divide two provided numbers and return the result as an integer.

Write a function that takes two integers as input, divides the first argument by the second, and returns the result as an integer.

Parameter Format
def solution(number1, number2):
return # Write code here

Constraints

  • The two numbers given as input are integers.

  • When dividing the first argument by the second, the integer part of the division result should be returned.

  • The divisor (denominator) must not be zero. While exception handling is typically necessary, it is not required for this coding quiz.


Input and Output Examples

  • Input: (10, 3)

  • Output: 3

  • Input: (15, 4)

  • Output: 3

  • Input: (9, 2)

  • Output: 4

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.