-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mei Tze - assignment2 #1
base: master
Are you sure you want to change the base?
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.
Overall great job! I certainly learned something new from you.
pass | ||
result = [] | ||
a = max_number + 1 | ||
for i in range(2, a): |
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.
you can actually try to make this shorter by writing it like this:
for i in range(2, max_number + 1)
and taking out line 11 :D that way, you don't need to create a variable.
for i in range(1, limit): | ||
if (i **3 < limit): | ||
result.append(i) | ||
return result.pop() |
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.
Nice use of .pop :D
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! I have just learnt that Jessica is using something like "result[-1]". It's nice too!
This PR will be reviewed by @saradesouza