Предмет: Информатика, автор: dkskke

Замінити всі елементи списку, більші за N, цим числом та надрукувати номери цих елементів. Вивести список із замінами.Информатика, сделайте код пайтонеПЛИЗЗ СРОЧНО,ДАМ ВСЁ СВОИ БАЛЛЫ.ЕСЛИ ОТВЕТ БУДЕТ НЕ ПРАВИЛЬНИМ И АБСУРДНЫМ=БАН,ЖАЛОБА.​

Ответы

Автор ответа: grigorylevic
0

Код:

lst = list(map(int, input('Уведіть числа через пробіл: ').split()))

n = int(input('Уведіть число: '))

numbers = []

for i in range(len(lst)):

   if lst[i] > n:

       numbers.append(i)

       lst[i] = n

print(f'Новий список: {lst}')

print(f'Номера замінених елементів: {numbers}')


dkskke: проверю и оценю
grigorylevic: Благодарю за Лучший ответ
dkskke: а вам за решение
Похожие вопросы
Предмет: География, автор: anastasijka84
Предмет: Алгебра, автор: kntr777
Предмет: Английский язык, автор: dhbsxjbshcf
Vocabulary and Grammar Test Unit 8 Test A
Vocabulary
1 Match the adjectives below to the job descriptions (1–8).
challenging stressful repetitive highly-skilled varied dead-end glamorous worthwhile
1 Senior Engineering Consultant: requires qualifications in civil engineering and training in bridge construction. ____________
2 Burger Sales Assistant: regular hours, no qualifications required, no promotion prospects. ____________
3 Celebrity Personal Assistant: required to live in Hollywood and travel the world with major film star. ____________
4 Oil Company Managing Director: top job for ambitious professional who wants to manage major international company and really test themselves. ____________
5 Machine Operator: required to operate machinery that puts tops on bottles every day. ____________
6 Aid Worker: volunteers required to help orphaned children in Bangladesh – make a difference to people’s lives! ____________
7 Firefighter: join our team who attend emergencies and help carry out rescues. You need to be fit and healthy to deal with some of the dangerous aspects of this occupation. ____________
8 Zookeeper: required to feed animals, advise visitors, work in ticket office, etc. – a hundred different jobs in one! ____________
Mark: ___ / 8
2 Circle the correct words in the idiomatic phrases (1–6). Then match phrases 1–6 to the phrases (A–F) with a similar meaning.
1 I had a lot on my dish / plate. A I taught the new employee what to do. 2 I put my feet / legs up. B I was really busy.
3 I started the ball rolling / falling. C I had to start working immediately.
4 I showed him the edges / ropes. D I relaxed.
5 I rose / lifted to the challenge. E I made the first suggestion in the debate.
6 I was thrown in at the far / deep end. F I worked hard and did well in a difficult situation.
Mark: ___ / 12
4 Match the words (1–6) to the sentences (A–F).
1 threat 2 boycott 3 discrimination 4 demonstration 5 injustice 6 march
A Students are walking through the city centre, shouting ‘Down with the government!’ ___
B People believe that the decision of the judge was unfair. ___
C The terrorists say that if their demands are not met, they will blow up the plane. ___
D In protest, citizens refused to buy the company’s products. ___
E The students were not allowed into the university because of the colour of their skin. ___
F People stood outside the embassy with signs saying ‘Free the prisoners’. ___
Mark: ___ / 6