Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8edc478

Browse files
GitandTonicGunish MukherjiMaximSmolskiy
authored
Adding missing return type to pi_estimator function (#13427)
- Add -> None return type annotation to pi_estimator function- Improves code clarity and follows Python type hinting best practices- Function already had proper type hints for parametersCo-authored-by: Gunish Mukherji <gunishmukherji@Gunishs-MacBook-Air.local>Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
1 parent3cea941 commit8edc478

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎maths/monte_carlo.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
fromstatisticsimportmean
99

1010

11-
defpi_estimator(iterations:int):
11+
defpi_estimator(iterations:int)->None:
1212
"""
1313
An implementation of the Monte Carlo method used to find pi.
1414
1. Draw a 2x2 square centred at (0,0).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp