-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: master
Are you sure you want to change the base?
Conversation
Fear the all-mighty gummy bear!!!
Intro to circuit design
My Reflection
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.
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 |
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.
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 |
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 inline comments! 👍
|
||
|
||
|
||
# prod = ['prod',build_random_function(depth-1, depth-1),build_random_function(depth-1, depth-1)] |
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 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 |
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 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) |
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.
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) |
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.
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 |
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 recommend that you add more unit tests of your own in future projects.
Turning in my project.