Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cheeyim
Copy link

@cheeyim cheeyim commented Nov 22, 2017

This PR will be reviewed by @saradesouza

@cheeyim cheeyim assigned jescht and saradesouza and unassigned jescht Nov 22, 2017
Copy link

@saradesouza saradesouza left a 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):

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()

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

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants