Wolfram Cloud
Resource Object
Example Resource
Largest and Smallest Values
Source Notebook
Largest and Smallest Values
Examples
Example Notebook
Open in Cloud
Download Notebook
The functions
T
a
k
e
L
a
r
g
e
s
t
,
T
a
k
e
L
a
r
g
e
s
t
B
y
,
T
a
k
e
S
m
a
l
l
e
s
t
, and
T
a
k
e
S
m
a
l
l
e
s
t
B
y
provide simple ways of selecting elements from lists and associations by numerical order.
For each South American country, associate the life expectancy of its inhabitants and the gross domestic product (GDP) at purchasing power parity (PPP):
I
n
[
1
]
:
=
d
a
t
a
=
E
n
t
i
t
y
V
a
l
u
e
S
o
u
t
h
A
m
e
r
i
c
a
C
O
U
N
T
R
I
E
S
,
l
i
f
e
e
x
p
e
c
t
a
n
c
y
,
G
D
P
|
C
u
r
r
e
n
t
U
S
D
o
l
l
a
r
;
P
P
P
,
"
E
n
t
i
t
y
A
s
s
o
c
i
a
t
i
o
n
"
O
u
t
[
1
]
=
A
r
g
e
n
t
i
n
a
7
6
.
3
0
5
y
r
,
$
4
.
6
8
4
9
9
×
1
1
1
0
p
e
r
y
e
a
r
,
B
o
l
i
v
i
a
6
7
.
2
6
y
r
,
$
7
.
3
7
9
5
7
×
1
0
1
0
p
e
r
y
e
a
r
,
B
r
a
z
i
l
7
3
.
9
3
7
y
r
,
$
3
.
1
9
2
4
×
1
2
1
0
p
e
r
y
e
a
r
,
C
h
i
l
e
7
9
.
9
5
5
y
r
,
$
4
.
0
0
5
3
4
×
1
1
1
0
p
e
r
y
e
a
r
,
C
o
l
o
m
b
i
a
7
4
.
0
3
8
y
r
,
$
6
.
6
5
5
9
4
×
1
1
1
0
p
e
r
y
e
a
r
,
E
c
u
a
d
o
r
7
6
.
4
7
1
y
r
,
$
1
.
8
3
8
5
5
×
1
1
1
0
p
e
r
y
e
a
r
,
F
a
l
k
l
a
n
d
I
s
l
a
n
d
s
M
i
s
s
i
n
g
[
N
o
t
A
v
a
i
l
a
b
l
e
]
,
$
1
.
0
5
1
×
8
1
0
p
e
r
y
e
a
r
,
F
r
e
n
c
h
G
u
i
a
n
a
7
7
.
1
2
1
y
r
,
$
1
.
5
5
1
×
9
1
0
p
e
r
y
e
a
r
,
G
u
y
a
n
a
6
6
.
2
9
5
y
r
,
$
5
.
7
5
8
0
8
×
9
1
0
p
e
r
y
e
a
r
,
P
a
r
a
g
u
a
y
7
2
.
2
5
9
y
r
,
$
6
.
0
9
7
7
×
1
0
1
0
p
e
r
y
e
a
r
,
P
e
r
u
7
4
.
8
2
6
y
r
,
$
3
.
8
9
1
4
7
×
1
1
1
0
p
e
r
y
e
a
r
,
S
u
r
i
n
a
m
e
7
1
.
0
1
9
y
r
,
$
9
.
2
1
4
0
4
×
9
1
0
p
e
r
y
e
a
r
,
U
r
u
g
u
a
y
7
7
.
2
3
y
r
,
$
7
.
2
7
5
1
×
1
0
1
0
p
e
r
y
e
a
r
,
V
e
n
e
z
u
e
l
a
7
4
.
6
3
3
y
r
,
$
5
.
5
4
3
2
9
×
1
1
1
0
p
e
r
y
e
a
r
Use
T
a
k
e
S
m
a
l
l
e
s
t
to get the two countries with the lowest life expectancy:
I
n
[
2
]
:
=
c
1
=
T
a
k
e
S
m
a
l
l
e
s
t
[
d
a
t
a
〚
A
l
l
,
1
〛
,
2
]
O
u
t
[
2
]
=
G
u
y
a
n
a
6
6
.
2
9
5
y
r
,
B
o
l
i
v
i
a
6
7
.
2
6
y
r
T
a
k
e
L
a
r
g
e
s
t
gives the two countries with the largest GDP at PPP:
I
n
[
3
]
:
=
c
2
=
T
a
k
e
L
a
r
g
e
s
t
[
d
a
t
a
〚
A
l
l
,
2
〛
,
2
]
O
u
t
[
3
]
=
B
r
a
z
i
l
$
3
.
1
9
2
4
×
1
2
1
0
p
e
r
y
e
a
r
,
C
o
l
o
m
b
i
a
$
6
.
6
5
5
9
4
×
1
1
1
0
p
e
r
y
e
a
r
Emphasize with colors these two sets of countries on a geographical map:
I
n
[
4
]
:
=
G
e
o
G
r
a
p
h
i
c
s
[
{
R
e
d
,
P
o
l
y
g
o
n
[
K
e
y
s
@
c
1
]
,
G
r
e
e
n
,
P
o
l
y
g
o
n
[
K
e
y
s
@
c
2
]
}
]
O
u
t
[
4
]
=
"
"
Source Metadata
Publisher Information
Contributed By:
Wolfram Staff