-
Description using e, pi, +, -, /, **, (, ), (and round)
Code import math def hundred(): pi = math.pi e = math.e val = pi**(pi + e/pi + pi**-pi) - pi/e - e**-e - e**-e - pi**-pi + pi**-(pi+pi/e) + pi**-(pi+e) - pi**-(pi+pi+e/pi) # 100.00000349005191 return round(val)
Test Cases test.assert_equals(hundred(),100)
Output:
-
Code - import math
- def hundred():
golden = ((1 + 5 ** 0.5)/2)return round((math.pi * math.e) ** golden * math.sqrt(math.pi * math.e) + math.pi * golden + golden / math.e + golden / (math.pi ** golden))- pi = math.pi
- e = math.e
- val = pi**(pi + e/pi + pi**-pi) - pi/e - e**-e - e**-e - pi**-pi + pi**-(pi+pi/e) + pi**-(pi+e) - pi**-(pi+pi+e/pi)
- # 100.00000349005191
- return round(val)
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}