บทช่วยสอนงูหลาม

Python HOME แนะนำ Python Python เริ่มต้น ไวยากรณ์หลาม ความคิดเห็นหลาม ตัวแปรหลาม ประเภทข้อมูลหลาม ตัวเลขหลาม Python Casting Python Strings Python Booleans ตัวดำเนินการ Python รายการหลาม Python Tuples ชุดหลาม พจนานุกรม Python Python If...Else Python ในขณะที่ลูป Python สำหรับลูป ฟังก์ชั่นหลาม Python Lambda Python Arrays Python คลาส/วัตถุ มรดกหลาม Python Iterators ขอบเขตหลาม โมดูล Python วันที่หลาม คณิตศาสตร์หลาม Python JSON Python RegEx Python PIP Python ลอง...ยกเว้น อินพุตผู้ใช้ Python การจัดรูปแบบสตริงหลาม

การจัดการไฟล์

การจัดการไฟล์ Python Python อ่านไฟล์ Python เขียน/สร้างไฟล์ Python ลบไฟล์

โมดูล Python

กวดวิชา NumPy เกมส์หมีแพนด้า กวดวิชา Scipy

Python Matplotlib

บทนำ Matplotlib Matplotlib เริ่มต้น Matplotlib Pyplot Matplotlib พล็อต เครื่องหมาย Matplotlib Matplotlib Line ป้ายกำกับ Matplotlib Matplotlib Grid แผนย่อย Matplotlib Matplotlib Scatter Matplotlib บาร์ Matplotlib Histograms Matplotlib แผนภูมิวงกลม

การเรียนรู้ของเครื่อง

เริ่มต้น โหมดค่ามัธยฐาน ส่วนเบี่ยงเบนมาตรฐาน เปอร์เซ็นไทล์ การกระจายข้อมูล การกระจายข้อมูลปกติ พล็อตกระจาย การถดถอยเชิงเส้น การถดถอยพหุนาม การถดถอยพหุคูณ มาตราส่วน รถไฟ/ทดสอบ ต้นไม้การตัดสินใจ

Python MySQL

MySQL เริ่มต้น MySQL สร้างฐานข้อมูล MySQL สร้างตาราง MySQL Insert MySQL Select MySQL Where MySQL สั่งซื้อโดย MySQL Delete MySQL Drop Table MySQL Update MySQL Limit MySQL เข้าร่วม

Python MongoDB

MongoDB เริ่มต้น MongoDB สร้างฐานข้อมูล MongoDB สร้างคอลเล็กชัน MongoDB แทรก MongoDB ค้นหา แบบสอบถาม MongoDB MongoDB Sort MongoDB ลบ MongoDB Drop Collection อัพเดท MongoDB MongoDB Limit

การอ้างอิงหลาม

ภาพรวมของ Python ฟังก์ชันในตัวของ Python Python String Methods Python List Methods วิธีพจนานุกรม Python วิธี Python Tuple Python Set Methods วิธีไฟล์ Python คีย์เวิร์ด Python ข้อยกเว้นของ Python คำศัพท์หลาม

การอ้างอิงโมดูล

โมดูลสุ่ม โมดูลคำขอ โมดูลสถิติ โมดูลคณิตศาสตร์ โมดูล cMath

Python ฮาวทู

ลบรายการที่ซ้ำกัน ย้อนกลับสตริง เพิ่มสองตัวเลข

ตัวอย่าง Python

ตัวอย่าง Python Python Compiler แบบฝึกหัดหลาม แบบทดสอบ Python ใบรับรอง Python

โมดูลคณิตศาสตร์หลาม


โมดูลคณิตศาสตร์หลาม

Python มีโมดูลในตัวที่คุณสามารถใช้สำหรับงานทางคณิตศาสตร์

mathโมดูลมีชุดของวิธีการและค่าคงที่


วิธีคณิตศาสตร์

Method Description
math.acos() Returns the arc cosine of a number
math.acosh() Returns the inverse hyperbolic cosine of a number
math.asin() Returns the arc sine of a number
math.asinh() Returns the inverse hyperbolic sine of a number
math.atan() Returns the arc tangent of a number in radians
math.atan2() Returns the arc tangent of y/x in radians
math.atanh() Returns the inverse hyperbolic tangent of a number
math.ceil() Rounds a number up to the nearest integer
math.comb() Returns the number of ways to choose k items from n items without repetition and order
math.copysign() Returns a float consisting of the value of the first parameter and the sign of the second parameter
math.cos() Returns the cosine of a number
math.cosh() Returns the hyperbolic cosine of a number
math.degrees() Converts an angle from radians to degrees
math.dist() Returns the Euclidean distance between two points (p and q), where p and q are the coordinates of that point
math.erf() Returns the error function of a number
math.erfc() Returns the complementary error function of a number
math.exp() Returns E raised to the power of x
math.expm1() Returns Ex - 1
math.fabs() Returns the absolute value of a number
math.factorial() Returns the factorial of a number
math.floor() Rounds a number down to the nearest integer
math.fmod() Returns the remainder of x/y
math.frexp() Returns the mantissa and the exponent, of a specified number
math.fsum() Returns the sum of all items in any iterable (tuples, arrays, lists, etc.)
math.gamma() Returns the gamma function at x
math.gcd() Returns the greatest common divisor of two integers
math.hypot() Returns the Euclidean norm
math.isclose() Checks whether two values are close to each other, or not
math.isfinite() Checks whether a number is finite or not
math.isinf() Checks whether a number is infinite or not
math.isnan() Checks whether a value is NaN (not a number) or not
math.isqrt() Rounds a square root number downwards to the nearest integer
math.ldexp() Returns the inverse of math.frexp() which is x * (2**i) of the given numbers x and i
math.lgamma() Returns the log gamma value of x
math.log() Returns the natural logarithm of a number, or the logarithm of number to base
math.log10() Returns the base-10 logarithm of x
math.log1p() Returns the natural logarithm of 1+x
math.log2() Returns the base-2 logarithm of x
math.perm() Returns the number of ways to choose k items from n items with order and without repetition
math.pow() Returns the value of x to the power of y
math.prod() Returns the product of all the elements in an iterable
math.radians() Converts a degree value into radians
math.remainder() Returns the closest value that can make numerator completely divisible by the denominator
math.sin() Returns the sine of a number
math.sinh() Returns the hyperbolic sine of a number
math.sqrt() Returns the square root of a number
math.tan() Returns the tangent of a number
math.tanh() Returns the hyperbolic tangent of a number
math.trunc() Returns the truncated integer parts of a number

ค่าคงที่ทางคณิตศาสตร์

Constant Description
math.e Returns Euler's number (2.7182...)
math.inf Returns a floating-point positive infinity
math.nan Returns a floating-point NaN (Not a Number) value
math.pi Returns PI (3.1415...)
math.tau Returns tau (6.2831...)