Study Notes of the Random and Math modules in Python
This article mainly introduces the study notes of the Random and Math modules in Python. This article describes the mathematical constants, common simple functions, and trigonometric functions of
This article mainly introduces the study notes of the Random and Math modules in Python. This article describes the mathematical constants, common simple functions, and trigonometric functions of the math module, describes the common functions,
Learning notes of the Random and Math modules in Python, pythonrandom
Since the random, math, and time''datetime modules in Python are often used recently, it is decided to take a moment to learn about the time system.
1. math Module
Functions in
1. discard the fractional part and keep the integer part parseInt (5/2) 2. rounded up. If there is a decimal number, add 1Math to the integer. ceil (5/2) 3, rounded down. math. round (5/2) 4, round down Math. floor (5/2) Math object method FF:
1. Discard the fractional part and retain the integer part.Parseint (5/2)
2. rounded up. If there is a decimal number, add 1 to the integer part.
Math. Ceil (5/2)
3. rounding.
Math. Round (5/2)
4. Round down
Math. Floor (5/2)
Math object MethodFF:
Recently, we have been working on this coordinate transformation task, which involves many profound things such as surveyors. Here I will not explain these difficult theories. Here, I will post the code to share with you. In fact, if you want to
When I went to college, I circulated such a super-good C program. I could use only three lines of code to calculate the number of π to 800 digits after the decimal point. I joked that it was written by aliens, it's really amazing. At that time,
Knowledge preparation-Coordinate System
Before we start the summary transformation, we need to first learn about the coordinate system of canvas.
"Pixel coordinate system": in HTML, we will set the attributes of the canvas: width and height. They
# Include Long A = 10000, B, c = 2800, d, e, f [2801], G;
Main (){For (; B-c;) f [B ++] = A/5;For (; D = 0, G = C * 2; C-= 14, printf ("%. 4D", e + D/A), E = D %)For (B = C; D + = f [B] * A, F [B] = D % -- g, D/= g --, -- B; D * = B );System ("pause
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.