Taifun
September 26, 2019, 11:10pm
#1
Here is a small challenge for today : write a procedure, which replaces an item from a list of lists , the goal is to use as less blocks as possible , the procedure should work for all row/column combinations
in the example below the item in row3/column2, i.e. the number 32 should be replaced by 99
the result would look like this
example project attached, just add the blocks of the procedure…
list_of_lists_challenge.aia (2.4 KB)
Taifun
10 Likes
list_of_lists_challenge.aia (2.6 KB)
Yeee this is my first solved daily challenge
I created it with 8 blocks inside procedure let’s see that if someone can create it less then 8 blocks.
1 Like
Peter
(Moderator)
September 27, 2019, 6:04am
#3
I can tell you already that @taifun has a solution of 6 blocks. But you are close.
2 Likes
When I see your reply I was like
Why I am here
3 Likes
Peter
(Moderator)
September 27, 2019, 6:13am
#5
But you are real close. Look at your code and see what you can change or leave out to make it work.
3 Likes
yusufcihan
(Yusuf Cihan)
September 27, 2019, 6:15am
#6
Can I ask if procedure’s call blocks are counts too?
Thanks Peter for appreciate me I think now I have to wait for @Taifun
Shreyash
(Shreyash Saitwal)
September 27, 2019, 6:26am
#9
I guess community needs a separate category for Daily Challenges!
#DailyChallenges
5 Likes
Peter
(Moderator)
September 27, 2019, 6:30am
#10
The blocks inside the procedure counts, so @parmarparth996 has 8 and @Taifun has 6.
1 Like
Peter
(Moderator)
September 27, 2019, 6:31am
#11
Don’t give up to easily. Hint: You have to change very little to your blocks.
1 Like
Peter I think I solved it
list_of_lists_challenge (1).aia (2.5 KB)
Take a look
6 Likes
yusufcihan
(Yusuf Cihan)
September 27, 2019, 6:53am
#14
Oh, I was going to do same But great work
5 Likes
Let’s try on next challenge and hope that you will be faster than me on next Challenge
2 Likes
yusufcihan
(Yusuf Cihan)
September 27, 2019, 9:53am
#16
But I still have chance to reduce the blocks before next challenge.
2 Likes
Taifun
September 27, 2019, 12:25pm
#17
well done…
and it works like this because of the call by reference characteristics of lists
Call by reference (also referred to as pass by reference) is an evaluation strategy where a function receives an implicit reference to a variable used as argument, rather than a copy of its value.
This typically means that the function can modify (i.e. assign to) the variable used as argument—something that will be seen by its caller. Call by reference can therefore be used to provide an additional channel of communication between the called function and the calling function. A call-by-reference ...
Taifun
4 Likes
Taifun
Closed
October 27, 2019, 12:25pm
#18
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.