The Joy of Programming
Functional Composition
There is no preview available for this lesson. Please join the course to access it. Click here to enroll.
Questions
Ak _00
2 years ago
Post
Dismiss
6.5 hints please
6.5 hints please
HM Hafiz Mohammed
2 years ago
Post
Dismiss
ex6.7 help plzz
ex6.7 help plzz
Want to discuss?
Post it here, our mentors will help you out.
Hiii
AK Ashbin K George
2 years ago
Post
Dismiss
Hlp with exercise 6.7
Hlp with exercise 6.7
AP Athira P S
2 years ago
Post
Dismiss
# define the repeat16 function here def repeat16(ball): ball1 = grid(ball, ball, ball, ball) ball2 = grid(ball, ball, ball, ball) ball3 = grid(ball, ball, ball, ball) ball4 = grid(ball, ball, ball, ball) ball = grid(ball1, ball2, ball3, ball4) return ball This is what I have done.
# define the repeat16 function here def repeat16(ball): ball1 = grid(ball, ball, ball, ball) ball2 = grid(ball, ball, ball, ball) ball3 = grid(ball, ball, ball, ball) ball4 = grid(ball, ball, ball, ball) ball = grid(ball1, ball2, ball3, ball4) return ball This is what I have done.
KL Khadeeja lubaba
2 years ago
Post
Dismiss
Exercise 6.8 ?
Exercise 6.8 ?
Want to discuss?
Post it here, our mentors will help you out.
Is there a neat way to give same argument multiple time in a function without changing function definition?
H hlo_there
2 years ago
Post
Dismiss
In a line like this: ball = grid(ball,ball,ball,ball) Is there a better way to do this other than repeating the same argument multiple time. something like: ball = grid(ball*4)
In a line like this: ball = grid(ball,ball,ball,ball) Is there a better way to do this other than repeating the same argument multiple time. something like: ball = grid(ball*4)
Want to discuss?
Post it here, our mentors will help you out.
doubts about exercise 6.5,6.6
RC Rahul C
2 years ago
Post
Dismiss
would you please help me how to code these two programes
would you please help me how to code these two programes
H hlo_there
2 years ago
Post
Dismiss
make four balls by rotating the given ball. then use grid
make four balls by rotating the given ball. then use grid
S Shereen
2 years ago
Post
Dismiss
would you please help me with exercice 6.7
would you please help me with exercice 6.7
AP Athira P S
2 years ago
Post
Dismiss
def cycle(ball): ball = grid(ball | rotate(90), ball, ball | rotate(180), ball | rotate(270)) return ball Ex 6.5
def cycle(ball): ball = grid(ball | rotate(90), ball, ball | rotate(180), ball | rotate(270)) return ball Ex 6.5
AK Ashbin K George
2 years ago
Post
Dismiss
Help with exercise 6.7
Help with exercise 6.7
Abhiram N J
2 years ago
Post
Dismiss
# define the repeat16 function here def repeat16(ball): ball1 = grid(ball, ball, ball, ball) ball2 = grid(ball, ball, ball, ball) ball3 = grid(ball, ball, ball, ball) ball4 = grid(ball, ball, ball, ball) ball = grid(ball1, ball2, ball3, ball4) return ball
# define the repeat16 function here def repeat16(ball): ball1 = grid(ball, ball, ball, ball) ball2 = grid(ball, ball, ball, ball) ball3 = grid(ball, ball, ball, ball) ball4 = grid(ball, ball, ball, ball) ball = grid(ball1, ball2, ball3, ball4) return ball
LA Liya Ann Biju
2 years ago
Post
Dismiss
Help with 6.8
Help with 6.8
DP Dhanush P N
2 years ago
Post
Dismiss
##6.7 ```Python def repeat4(a): return grid(a, a, a, a) # define the repeat16 function here def repeat16(a): return repeat4(repeat4(a)) ```
##6.7 ```Python def repeat4(a): return grid(a, a, a, a) # define the repeat16 function here def repeat16(a): return repeat4(repeat4(a)) ```
DP Dhanush P N
2 years ago
Post
Dismiss
##6.8 ```Python def repeat4(a): return grid(a, a, a, a) def repeat16(a): return repeat4(repeat4(a)) # define the repeat64 function here def repeat64(a): return repeat16(repeat4(a)) ```
##6.8 ```Python def repeat4(a): return grid(a, a, a, a) def repeat16(a): return repeat4(repeat4(a)) # define the repeat64 function here def repeat64(a): return repeat16(repeat4(a)) ```
DP Dhanush P N
2 years ago
Post
Dismiss
##6.9 ```Python split1 = below(blank, shape) split2 = below(beside(split1, split1), shape) split3 = below(beside(split2, split2), shape) split4 = below(beside(split3, split3), shape) final = beside(split4, blank) show(final) ```
##6.9 ```Python split1 = below(blank, shape) split2 = below(beside(split1, split1), shape) split3 = below(beside(split2, split2), shape) split4 = below(beside(split3, split3), shape) final = beside(split4, blank) show(final) ```
Want to discuss?
Post it here, our mentors will help you out.