From a38174464239a2793074f9f03bbbfcf066e5f17b Mon Sep 17 00:00:00 2001 From: JollyCo-operation2527 <146475653+JollyCo-operation2527@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:40:28 +0000 Subject: [PATCH] Added a new question --- questions/sort() method.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 questions/sort() method.md diff --git a/questions/sort() method.md b/questions/sort() method.md new file mode 100644 index 0000000..3e3ff4e --- /dev/null +++ b/questions/sort() method.md @@ -0,0 +1,11 @@ +# Coding question + +## Question + +Write a program that initialize an empty list, then populate the list with 20 random integers from 1 to 99. Then write a function to sort those integers in ascending order. Print the result after each step. + +Sample: + +my_list after generate random numbers = [3, 7, 99, 50, 77, 52, 22, 76, 55, 42, 80, 77, 63, 45, 44, 74, 96, 33, 11] + +my_list after sorted = [3, 7, 11, 22, 33, 42, 44, 45, 50, 52, 55, 63, 74, 76, 77, 77, 80, 96, 99] \ No newline at end of file