Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
ec5641c
Update solution.hide.py
josemoracard Dec 20, 2023
f7534ae
Update app.py
josemoracard Dec 20, 2023
ad17111
Update README.md
josemoracard Dec 20, 2023
58cb51c
Create README.es.md
josemoracard Dec 20, 2023
ec7c404
Update solution.hide.py
josemoracard Dec 20, 2023
bbb3734
Update app.py
josemoracard Dec 20, 2023
9a63297
Update test.py
josemoracard Dec 20, 2023
d3d8066
Update README.md
josemoracard Dec 20, 2023
aa9dc78
Create README.es.md
josemoracard Dec 20, 2023
e826bd8
Update README.es.md
josemoracard Dec 20, 2023
d0500b6
Update README.md
josemoracard Dec 20, 2023
72c4780
Update README.md
josemoracard Dec 20, 2023
252579f
Update README.md
josemoracard Dec 20, 2023
285882d
Update app.py
josemoracard Dec 20, 2023
bd82221
Update app.py
josemoracard Dec 20, 2023
95337e9
Create README.es.md
josemoracard Dec 20, 2023
ee3f111
Update README.md
josemoracard Dec 20, 2023
9fb2773
Update README.es.md
josemoracard Dec 20, 2023
dc8d00f
Update README.md
josemoracard Dec 20, 2023
0b91997
Update README.md
josemoracard Dec 20, 2023
236281d
Update README.es.md
josemoracard Dec 20, 2023
459bc2f
Update solution.hide.py
josemoracard Dec 20, 2023
71cdd54
Update solution.hide.py
josemoracard Dec 20, 2023
1860b79
Update README.md
josemoracard Dec 20, 2023
d40a9ad
Update solution.hide.py
josemoracard Dec 20, 2023
dd74f20
Update solution.hide.py
josemoracard Dec 20, 2023
34f92c0
Update app.py
josemoracard Dec 20, 2023
3fb7420
Update app.py
josemoracard Dec 20, 2023
e02e57e
Update README.md
josemoracard Dec 20, 2023
fce6fca
Update README.md
josemoracard Dec 20, 2023
ce2a099
Update README.es.md
josemoracard Dec 20, 2023
66028ab
Update README.md
josemoracard Dec 20, 2023
fbef855
Update README.es.md
josemoracard Dec 20, 2023
d82e4bb
Update test.py
josemoracard Dec 20, 2023
27ce1a1
Update README.es.md
josemoracard Dec 20, 2023
3fd9bd8
Update README.md
josemoracard Dec 20, 2023
8563d94
Update app.py
josemoracard Dec 20, 2023
09ecb60
Create README.es.md
josemoracard Dec 20, 2023
e5de870
Update README.md
josemoracard Dec 20, 2023
ec05b78
Update README.es.md
josemoracard Dec 20, 2023
9a71498
Update README.md
josemoracard Dec 20, 2023
543a5ab
Update app.py
josemoracard Dec 20, 2023
07ec6c3
Update solution.hide.py
josemoracard Dec 20, 2023
e45ddb9
Update README.md
josemoracard Dec 20, 2023
27c687e
Create README.es.md
josemoracard Dec 20, 2023
536cded
Update README.md
josemoracard Dec 20, 2023
1fff9c7
Update test.py
josemoracard Dec 20, 2023
2637b79
Update README.md
josemoracard Dec 20, 2023
087d9ba
Update app.py
josemoracard Dec 20, 2023
c7bb7ad
Create README.es.md
josemoracard Dec 20, 2023
155e5c6
Update README.md
josemoracard Dec 20, 2023
926d7f8
Update README.es.md
josemoracard Dec 20, 2023
042bc62
Update solution.hide.py
josemoracard Jan 1, 2024
64236e9
Update README.es.md
josemoracard Jan 1, 2024
436732c
Update README.es.md
josemoracard Jan 1, 2024
2c2e41d
Update README.md
josemoracard Jan 1, 2024
48b138f
Update README.md
josemoracard Jan 1, 2024
962eff4
Update README.md
josemoracard Jan 1, 2024
041dc4b
Update solution.hide.py
josemoracard Jan 1, 2024
c6a52ad
Update test.py
josemoracard Jan 1, 2024
e8c667b
Update README.md
josemoracard Jan 1, 2024
3244157
Update test.py
josemoracard Jan 1, 2024
c442c87
Update solution.hide.py
josemoracard Jan 1, 2024
8677488
Update README.es.md
josemoracard Jan 1, 2024
ebb3428
Update README.md
josemoracard Jan 1, 2024
bf6d3b6
Update solution.hide.py
josemoracard Jan 1, 2024
2ddeba9
Update README.md
josemoracard Jan 1, 2024
142bbf9
Update README.es.md
josemoracard Jan 1, 2024
adf728a
Update README.es.md
josemoracard Jan 1, 2024
5be39e5
Update README.es.md
josemoracard Jan 1, 2024
93ecba3
Update README.md
josemoracard Jan 1, 2024
50518dd
Update README.md
josemoracard Jan 1, 2024
d978db0
Update README.md
josemoracard Jan 1, 2024
762b3e9
Update README.md
josemoracard Jan 1, 2024
584277f
Update solution.hide.py
josemoracard Jan 1, 2024
58e5a67
Update README.es.md
josemoracard Jan 1, 2024
bda5448
Update test.py
josemoracard Jan 1, 2024
255205e
Update README.md
josemoracard Jan 1, 2024
90846cc
Update README.es.md
josemoracard Jan 1, 2024
4916ff4
Update README.md
josemoracard Jan 1, 2024
5adb95e
Update solution.hide.py
josemoracard Jan 1, 2024
5121f6c
Update solution.hide.py
josemoracard Jan 17, 2024
b95c13d
Update solution.hide.py
josemoracard Jan 17, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
josemoracard authored Dec 20, 2023
commit 1860b79c8844c89f035cfbcf8b71205414081df7
38 changes: 22 additions & 16 deletions exercises/38-sort-tuples-ascending/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# `38` Sort Tuples Ascending

## 📝 Instructions:

## :pencil: Instructions:
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:
Write a function `sort_tuples_ascending()` to sort the (`name`, `age`, `score`) tuples by ascending order where `name` is a string, `age` and `score` are numbers. The sort criteria is:

1. Sort based on name;
2. Then sort based on age;
1. Sort based on name.
2. Then sort based on age.
3. Then sort by score.
The priority is that name > age > score.
If the following tuples are given as input to the program:
> - `Tom,19,80`
> - `John,20,90`
> - `Jony,17,91`
> - `Jony,17,93`
> - `Jason,21,85`

> - Then, the output of the program should be:
`[('John', '20', '90'), ('Jony', '17', '91'), ('Jony', '17', '93'), ('Jason', '21', '85'), ('Tom', '19', '80')]`

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

## 📎 Example input:

```py
sort_tuples_ascending("Tom,19,80 John,20,90 Jony,17,91 Jony,17,93 Jason,21,85")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mejor que reciba una lista de strings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

```

## 📎 Example output:

```py
[('John', '20', '90'), ('Jony', '17', '91'), ('Jony', '17', '93'), ('Jason', '21', '85'), ('Tom', '19', '80')]
```

## 💡 Hints:

+ We use `itemgetter` to enable multiple sort keys.

+ Notice that the output is a list with tuples inside.