Class 10 Exam  >  Class 10 Questions  >  Write the following Python programs(list/tupl... Start Learning for Free
Write the following Python programs(list/tuple):
1. Traversing a list
2. Finding the element by mentioning its index.
3.finding the idex of element by mentioning it
4. Finding the mean& median of the list/tuple
5. Finding the maximum and minimum number?
Most Upvoted Answer
Write the following Python programs(list/tuple): 1. Traversing a list ...
#1. Python program to traverse a list
# entering a list from user
list1=eval(input ("Enter a list of numbers"))
l=len (list1)
# traversing the list
for i in range(0, l) :
print( "the elements in the list are", i)
#2. Python program to find the element by mentioning it index
# entering a list from user
list1=eval(input(" enter a list of numbers:"))
l=len (list1)
# entering the element from the user for which index is mentioned
for i in range (0, l) :
index=int(input (" enter the index :"))
if index=list1(index[i])
print(" the element at index", index, "is:", [i])
else:
print(" element not found")
#3.# Python program to find the index by mentioning element
it is similar to the question 2 above just use the element function instead of index function
4. the procedure is same for entering the list from user then calculate the length by using len () function then find the sum of the numbers in the list by using sum() function
then calculate the median as m=sum_numbers/l
and I show the median by printing it
5. use Max and min function to find the maximum and minimum number in the list of number
Community Answer
Write the following Python programs(list/tuple): 1. Traversing a list ...
1. Traversing a list:

```python
my_list = [1, 2, 3, 4, 5]

for element in my_list:
print(element)
```

2. Finding the element by mentioning its index:

```python
my_list = [1, 2, 3, 4, 5]

index = 2
element = my_list[index]
print(element)
```

3. Finding the index of an element by mentioning it:

```python
my_list = [1, 2, 3, 4, 5]

element = 3
index = my_list.index(element)
print(index)
```

4. Finding the mean:

```python
my_list = [1, 2, 3, 4, 5]

mean = sum(my_list) / len(my_list)
print(mean)
```
Attention Class 10 Students!
To make sure you are not studying endlessly, EduRev has designed Class 10 study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Class 10.
Explore Courses for Class 10 exam

Top Courses for Class 10

Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number?
Question Description
Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? for Class 10 2024 is part of Class 10 preparation. The Question and answers have been prepared according to the Class 10 exam syllabus. Information about Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? covers all topics & solutions for Class 10 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number?.
Solutions for Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? in English & in Hindi are available as part of our courses for Class 10. Download more important topics, notes, lectures and mock test series for Class 10 Exam by signing up for free.
Here you can find the meaning of Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? defined & explained in the simplest way possible. Besides giving the explanation of Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number?, a detailed solution for Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? has been provided alongside types of Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? theory, EduRev gives you an ample number of questions to practice Write the following Python programs(list/tuple): 1. Traversing a list 2. Finding the element by mentioning its index. 3.finding the idex of element by mentioning it 4. Finding the mean& median of the list/tuple 5. Finding the maximum and minimum number? tests, examples and also practice Class 10 tests.
Explore Courses for Class 10 exam

Top Courses for Class 10

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev