طريقة Python math.log10 ()
مثال
أوجد اللوغاريتم ذو الأساس 10 للأرقام المختلفة
# Import math Library
import math
# Return the base-10 logarithm
of different numbers
print(math.log10(2.7183))
print(math.log10(2))
print(math.log10(1))
التعريف والاستخدام
تُرجع هذه math.log10()
الطريقة اللوغاريتم ذي الأساس 10 لرقم.
بناء الجملة
math.log10(x)
قيمه المعامل
Parameter | Description |
---|---|
x | Required. Specifies the value to calculate the logarithm for. If the value is 0 or a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
تفاصيل تقنية
قيمة الإرجاع: | قيمة float تمثل اللوغاريتم ذي الأساس 10 لرقم |
---|---|
نسخة بايثون: | 2.3 |