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

Harrison Young Recursive Art #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hthomas60
Copy link

Turning in my project.

Harrison Young and others added 4 commits October 1, 2017 21:44
Fear the all-mighty gummy bear!!!
Intro to circuit design
My Reflection
Copy link

@SeunginLyu SeunginLyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! I've made some comments that might help you stylize your code a little better.

@@ -2,6 +2,33 @@

import random
from PIL import Image
import math
pi = 3.14

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a stylistic convention to use all caps for constants. PI=3.14

@@ -2,6 +2,33 @@

import random
from PIL import Image
import math
pi = 3.14
def prod(a,b): #Returns the product of two values

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice inline comments! 👍




# prod = ['prod',build_random_function(depth-1, depth-1),build_random_function(depth-1, depth-1)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove comments for final code submission.

# return "Error"
#TODO: implement this
#print (f)
e = evaluate_random_function #dummy function to make the code take up less room

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's actually more readable to use the full function name in this case.

"""

difference = val-input_interval_start
difference = difference/ (input_interval_end - input_interval_start)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple syntax : difference += input_interval_end - input_interval_start)

red_function = build_random_function(9, 15)
green_function = build_random_function(9, 15)
blue_function = build_random_function(9, 15)
x = random.uniform(0, 1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this line of code doing? Perhaps add an inline comment explaining why you added this line of code.

@@ -43,7 +110,47 @@ def evaluate_random_function(f, x, y):
>>> evaluate_random_function(["y"],0.1,0.02)
0.02

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend that you add more unit tests of your own in future projects.

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.

2 participants