Quiz Catalog

Catalog of quizzes

import math

class Number:
  def __init__(self, number):
    self.number = number

  def __floor__(self):
    return math.floor(self.number)

number = Number(1.1)
print(math.floor(number))
1
  • class/method/floor