This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-08-07 10:12:01

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Lists: Delete Max or Min

http://img17.imageshack.us/img17/1369/listblox.gif

No real need to explain, it would really help with organizing data. Please post your thoughts, and tell me what you think.

If there's a list like his one:
_
3
2
5
6
3
1

The block [ delete ( max ) of list [ ] ] would delete the 4th list entry (6), because it has the greatest value.
The block [ delete ( min ) of list [ ] ] would delete the last list entry (1), because it has the smallest value

Last edited by illusionist (2009-08-12 12:02:22)


http://i.imgur.com/8LX1NrV.png

Offline

 

#2 2009-08-10 03:33:07

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Lists: Delete Max or Min

I don't see what you would use the improvements for. What is the max and the min? When would you use the max and min?


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2009-08-11 14:34:36

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Lists: Delete Max or Min

Jonathanpb wrote:

I don't see what you would use the improvements for. What is the max and the min? When would you use the max and min?

Delete: The maximum/minimum value that a list contains.

Simple as that.


http://i.imgur.com/8LX1NrV.png

Offline

 

#4 2009-08-11 15:06:54

m44
Scratcher
Registered: 2008-02-04
Posts: 500+

Re: Lists: Delete Max or Min

you could also make a different list that sorts the other list in order and finds the max or min.


METAL SLUG is out!!! (here) and M44's BESTShttp://img708.imageshack.us/img708/6673/msbanner.jpg

Offline

 

#5 2009-08-11 20:53:56

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Lists: Delete Max or Min

m44 wrote:

you could also make a different list that sorts the other list in order and finds the max or min.

Takes too long. I need INSTANT sorting.


http://i.imgur.com/8LX1NrV.png

Offline

 

#6 2009-08-12 01:22:59

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: Lists: Delete Max or Min

I don't understand. For the max., can't you just use All? And for the min., that would be 1, right? So just change the 1 to a number that you want to get rid of.


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

#7 2009-08-12 01:29:45

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Lists: Delete Max or Min

illusionist wrote:

Jonathanpb wrote:

I don't see what you would use the improvements for. What is the max and the min? When would you use the max and min?

Delete: The maximum/minimum value that a list contains.

Simple as that.

You didn't mention earlier, so I misunderstood. Anyway, how would you set the max and min? Would you have a block that says 'set [max or min goes here] to __' and 'change [max or min goes here] by __'?

Anyway, you could just use variables. And what do you call them? Max and min... there are your blocks.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#8 2009-08-12 06:55:35

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: Lists: Delete Max or Min

http://scratch.mit.edu/projects/bhz/370119 auto sorts anything you input

Offline

 

#9 2009-08-12 09:44:19

ScratchScripter
Scratcher
Registered: 2008-08-21
Posts: 73

Re: Lists: Delete Max or Min

Chrischb wrote:

I don't understand. For the max., can't you just use All? And for the min., that would be 1, right? So just change the 1 to a number that you want to get rid of.

I hope I got that right:

If there's a list like his one:
_
3
2
5
6
3
1

The block [ delete ( max ) of list [ ] ] would delete the 4th list entry (6), because it has the greatest value.
The block [ delete ( min ) of list [ ] ] would delete the last list entry (1), because it has the smallest value.

Offline

 

#10 2009-08-12 12:00:18

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Lists: Delete Max or Min

Jonathanpb wrote:

illusionist wrote:

Jonathanpb wrote:

I don't see what you would use the improvements for. What is the max and the min? When would you use the max and min?

Delete: The maximum/minimum value that a list contains.

Simple as that.

You didn't mention earlier, so I misunderstood. Anyway, how would you set the max and min? Would you have a block that says 'set [max or min goes here] to __' and 'change [max or min goes here] by __'?

Anyway, you could just use variables. And what do you call them? Max and min... there are your blocks.

You obviously don't understand what I am saying. The maximum value of a list, is the highest number that it contains. The minimum value, is the lowest number. Make sense???

Chrischb wrote:

I don't understand. For the max., can't you just use All? And for the min., that would be 1, right? So just change the 1 to a number that you want to get rid of.

That doesn't make any sense. Do you know what a maximum and minimum are?

Last edited by illusionist (2009-08-12 12:01:40)


http://i.imgur.com/8LX1NrV.png

Offline

 

#11 2009-08-12 14:48:02

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Lists: Delete Max or Min

I think people are getting confused here. I get what illusionist and i'll try to explain:
Ok, here goes:
There is a list called: hi, for example.
And in that list, there is these values
Value number=value
________________________
1=3
2=5
3=5
4=8
5=1
_______________________
This block:[ delete ( max ) of list [hi] ] , would delete the greatest value-not value number-and in this case: 4=8.

This block:[ delete ( min ) of list [hi] ] , would delete the lowest value-not value number-and in this case: 5=1.

This block wont work if the values are not numbers.
Hope i made that clear.


Hai.

Offline

 

Board footer