Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f727d2

Browse files
committed
changed readme
1 parent 06b3545 commit 3f727d2

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

‎.learn/resets/001-hello_world/app.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# your code here

‎.learn/resets/31-sum-eigth-digit/app.py‎

Whitespace-only changes.

‎.learn/resets/37-validity-of-password/app.py‎

Whitespace-only changes.

‎.learn/resets/38-sort-tuples-ascending/app.py‎

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# `38` Sort Tuples Ascending
2+
Debe escribir un programa para ordenar las tuplas (nombre, edad, altura) por orden ascendente donde el nombre es `string`, la edad y la altura son `números`.
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
You are required to write a program to sort the (name, age, height) tuples by ascending order where name is string, age and height are numbers. The tuples are input by console. The sort criteria is:
2-
1: Sort based on name;
3-
2: Then sort based on age;
4-
3: Then sort by score.
1+
# `38` Sort Tuples Ascending
2+
3+
4+
## :pencil: Instructions:
5+
You are required to write a program to sort the (`name`, `age`, `height`) tuples by ascending order where name is `string`, age and height are numbers. The tuples are input by console. The sort criteria is:
6+
7+
1. Sort based on name;
8+
2. Then sort based on age;
9+
3. Then sort by score.
510
The priority is that name > age > score.
611
If the following tuples are given as input to the program:
7-
Tom,19,80
8-
John,20,90
9-
Jony,17,91
10-
Jony,17,93
11-
Json,21,85
12-
Then, the output of the program should be:
13-
[('John', '20', '90'), ('Jony', '17', '91'), ('Jony', '17', '93'), ('Json', '21', '85'), ('Tom', '19', '80')]
12+
> - `Tom,19,80`
13+
> - `John,20,90`
14+
> - `Jony,17,91`
15+
> - `Jony,17,93`
16+
> - `Jason,21,85`
17+
18+
> - Then, the output of the program should be:
19+
`[('John', '20', '90'), ('Jony', '17', '91'), ('Jony', '17', '93'), ('Jason', '21', '85'), ('Tom', '19', '80')]`
1420

15-
Hints:
21+
## :bulb: Hint:
1622
In case of input data being supplied to the question, it should be assumed to be a console input.
1723
We use itemgetter to enable multiple sort keys.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /