Strength III (Python implemented in pycharm)

Source: Internet
Author: User
Tags pow
‘‘‘
Describe
365 days a year, on the 1th day of the capacity value of the base, recorded as 1.0.
When studying well, the ability value increases n‰ compared to the day before, and when there is no learning, the ability value drops n‰ compared to the previous day.
How much difference does it make in a year's worth of effort or indulgence? Where the range of values for n is 0 to 100,n can be decimals, assuming the input meets the requirements.
Obtain the user input n, calculate the ability value and the ability ratio between daily effort and 365 days ' indulgence, among which, the ability value retains 2 digits after the decimal point, the ratio between the ability output integer, the output result is separated by commas.
Use input () to get N.
Input
Example 1:
1
Output
Example 1:

‘‘‘
A = 1.0
N = input ()
n =eval (n)/1000
Dayup = Pow (a+n, 365)
Daydown = Pow (a-n, 365)
#三种解法
# b = Round (Dayup//daydown)
# b = Int (dayup//daydown)
b = Int (dayup/daydown)
Print ("{:. 2f},{:.2f},{}". Format (Dayup, daydown,b))

Strength III (Python implemented in pycharm)

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.