-
-
Notifications
You must be signed in to change notification settings - Fork 46.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem 234 project Euler #883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the filename so that it ends in .py.
Also, please add a comment at the top of the file that links to the problem statement:
# https://projecteuler.net/problem=234
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some pep8 revisions
Or automate the process by running python/black. |
+1 |
Co-Authored-By: Emmanuel Arias <emmanuelarias30@gmail.com>
Co-Authored-By: Emmanuel Arias <emmanuelarias30@gmail.com>
Co-Authored-By: Emmanuel Arias <emmanuelarias30@gmail.com>
Co-Authored-By: Emmanuel Arias <emmanuelarias30@gmail.com>
Co-Authored-By: Emmanuel Arias <emmanuelarias30@gmail.com>
Co-Authored-By: Emmanuel Arias <emmanuelarias30@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comments. But I think this could be merge :-)
project_euler/problem_234.py
Outdated
return b | ||
elif n==3: | ||
return str(a)+str(b) | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this else could be ignore. Because never will be go to else if return occur before. (Just a comment)
and temp=0 could be defined after the ifs
. This way we could avoid use memory when is not necessary.
Okay. Thank u for suggestions.
Regards
Archit H.
…On Tue, 11 Jun 2019, 4:47 am Emmanuel Arias, ***@***.***> wrote:
***@***.**** approved this pull request.
I left a comments. But I think this could be merge :-)
------------------------------
In project_euler/problem_234.py
<#883 (comment)>:
> @@ -0,0 +1,31 @@
+# https://projecteuler.net/problem=234
+def fib(a, b, n):
+ temp = 0
+ if n==1:
+ return a
+ elif n==2:
+ return b
+ elif n==3:
+ return str(a)+str(b)
+ else:
I think this else could be ignore. Because never will be go to else if
return occur before. (Just a comment)
and temp=0 could be defined after the ifs. This way we could avoid use
memory when is not necessary.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#883?email_source=notifications&email_token=AK6GTHFCH7Q2SQ23HD73N53PZ3OHZA5CNFSM4HVRSQSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB3DHVBY#pullrequestreview-247888519>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK6GTHE6VWF4JG6AKWQ6XO3PZ3OHZANCNFSM4HVRSQSA>
.
|
else was not required temp declared afterwards suggested changes are correct.Thank u!
Are you going to merge it? |
You should wait for the commiters to merge it. I CC @poyea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request!🤩
No description provided.