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

Помогите пожалуйста

Приложения:

Ответы

Автор ответа: Aman201010
1

Ответ:

1)

elements = []  # Создаем пустой список

# Указанные элементы

specified_elements = [45, -56, 'в', 'мир', 5, 13]

# Итерируемся по указанным элементам и добавляем их в список

for element in specified_elements:

   elements.append(element)

# Вывод списка

print(elements)  # Вывод: [45, -56, 'в', 'мир', 5, 13]

2)

AL = ['d', 'k', 'a', 'c', 'e', 't', 'o']

list_length = len(AL)

print("Разрядность списка AL:", list_length)  # Вывод: 7

3)

AL = ['d', 'k', 'a', 'c', 'e', 't', 'o']

AL.reverse()

print("Список после изменения порядка:", AL)  # Вывод: ['o', 't', 'e', 'c', 'a', 'k', 'd']

4)

AL = ['d', 'k', 'a', 'c', 'e', 't', 'o']

# Находим индекс элемента 'е'

index_of_e = AL.index('e')

# Вставляем элемент 'а' после элемента 'е'

AL.insert(index_of_e + 1, 'а')

print("Список после вставки:", AL)  # Вывод: ['d', 'k', 'a', 'c', 'e', 'а', 't', 'o']

5)

AL = ['d', 'k', 'a', 'c', 'e', 't', 'o']

# Заменяем элемент с индексом 1 (второй элемент) на 'у'

AL[1] = 'у'

print("Список после замены:", AL)  # Вывод: ['d', 'у', 'a', 'c', 'e', 't', 'o']

6)

elements = [45, -56, 'в', 'мир', 5, 13]

# Удаляем элемент с индексом 3 (четвёртый элемент)

elements.pop(2)

print("Список после удаления элемента:", elements)  # Вывод: [45, -56, 'мир', 5, 13]

Похожие вопросы
Предмет: Английский язык, автор: batyrtoktahu95
1. This is … banana.

a) a b) the c) an d) –

2. This is … taxi. … taxi is red.

a) a-an b) an-the c) a-the d) –

3. She … the piano often.

a) is playing b) will play c) plays d) did play

4. It … snow last Sunday.

a) didn’t b) wasn’t c) isn’t d) won’t

5. The boys must do everything … .

a) himself b) yourself c) yourselves d) themselves

6. This is … friend.

a) he b) my c) I d) we

7. She … taken the bag.

a) have b) has c) is d) -

8. We … children.

a) is b) are c) am d) –

9. Telephone boxes … brown.

a) is b) are c) am d) –

10. … often visit their friends.

a) The Browns b) Browns c) Browns’ d) The Browns’

11. His daughter … a computer.

a) have got b) has got c) have d) has

12. There is … orange in the box.

a) a b) some c) an d) –

13. There are … flowers in the vase.

a) an b) a c) some d) –

14. There are … sweets in the vase.

a) many b) much c) any d) –

15. There is … flour in the packet.

a) any b) many c) much d) –

16. The boy is … the house.

a) between b) in c) on d) under

17. There … a bed near the window.

a) are b) is c) were d) am

18. He has a pen in his hand. … pen is red.

a) this b) these c) that d) those

19. She looks at the dolls. … dolls are on the sofa.

a) those b) that c) this d) these

20. He … make the bed.

a) may b) can c) should d) could

21. You must … a letter.

a) to write b) write c) writing d) wrote

22. … the floor?

a) She washed b) Was she wash c) Did she wash d) Were she wash

23. Peter is … than Jack.

a) strong b) stronger c) the strongest d) strongest

24. This music group is popular. But the … group is the “Beatles”

a) popular b) most popular c) more popular d) the popularest

25. Москва «такой же древний город, как» и Киев.

a) old b) older c) as old as d) the oldest





Предмет: Математика, автор: kobeevauldana