[Tutor] Variable list problem

Le Mar lemade at hotmail.com
Thu Oct 12 17:29:02 EDT 2017

hi i'm wondering if anyone could help me with this exercise:

  1.  Read an integer number from the console, store the result in a variable n
  2.  Read ‘n’ integers from the console and store them in a list
  3.  Sort the list in reverse order – from highest to lowest
  4.  Loop over the elements in the list and print them each on their own line to the console

Inputs: 1 number n – number of integers to read, list of integers

Outputs: n integers, one per line, sorted from highest to lowest

Thanks a lot.

More information about the Tutor mailing list