creates a list through cycling



  • Write a programme that creates a list through the cyclical input(s), the length of the list shall be arbitrary, i.e. the condition for the end of the entry and the unlimited number of elements before the entry. At the exit, you will receive a cortage from the list. Determine the length of the cortage L and remove its average elements with the IFL /2 indices.

    I don't give a shit.

    Help!



  • Pseudocod on pseudopitone, because teaching, transfer to the python yourself.

    создать пустой список
    

    бесконечный цикл:
    ввести очередное число
    если это число равно некоему числу, означающему конец цикла:
    прервать цикл
    добавить введённое число в список

    преобразовать список в кортеж
    определить длину кортежа
    определить индекс середины кортежа

    Well, I didn't the middle elements either, but you already have something to work on.


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2