Python (2) (basic input/output statement)

Source: Internet
Author: User

Let's first say the output:

An important part of the output is:

-------------------------------------------------------------------------------

So here's the problem.

12.234567 big guys are probably all clear about the data, so what does 5.2f mean?

.2f is the two-bit intercept, intercept 3 bits is. 3f, etc.

12.234567: The number of digits in the decimal point is 6 bits, what happens when we intercept the 10 decimal places?

So the question comes again ....

What does 5.10f 5 mean?

To understand the use of 5, we must first understand 5.10f

10 digits after the decimal point, 5 means: The number of integers plus the decimal point after the number of decimal places is a total of 5 bits

If you do not enter the data after the decimal point: Another format output% again input: input and output are very simple, time is not early, 2.20, too sleepy, first sleep

Python (2) (basic input/output statement)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.