1. Write a python program to select the highest number from the list of number as in the output below.
The output is:
number_list = [22, 5, 76, 100, 12.3, 9]
Expected Answer: The highest number in the number_list is: 100
2. Write a python program to select the lowest number from the list of number as in the output below.
The output is:
number_list = [22, 5, 76, 100, 12.3, 9]
Expected Answer: The lowest number in the number_list is: 5
3. Write a python program to arrange the list of number as in the output below in increasing order.
The output is:
number_list = [22, 5, 76, 100, 12.3, 9]
Expected Answer: The number_list arranged in increasing order: [5, 9, 12.3, 22, 76, 100]
4. Write a python program to arrange the list of number as in the output below in decreasing order.
The output is:
number_list = [22, 5, 76, 100, 12.3, 9]
Expected Answer: The number_list arranged in increasing order: [100, 76, 22, 12.3, 9, 5]
5. Write a python program to remove all the odd numbers from the number_list variable as in the output below.
The output is:
number_list = [22, 5, 76, 100, 12.3, 9, 88, 7, 13, 57]
Expected Answer: The remaining even numbers in the number_list are: [22, 76, 100, 88]
6. Write a python program to switch the sequence of each word in the noun_list as in the output below.
The output is:
noun_list = ['Python', 'Exercises', 'Free', 'Answer', 'Tutorials', 'Numpy']
Expected Answer: The new noun list after changing sequence: [Different from original noun_list]
7. Write a python program to switch a list of character_a as in the output below into a string.
The output is:
character_a = ['p', 'y', 't', 'h', 'o', 'n']
Expected Answer:Changing from a list of character ['p', 'y', 't', 'h', 'o', 'n'] into a string: python
8. Write a python program to access the index of noun_list as in the output below. Note that the loop method is needed to assist in getting answer.
The output is:
noun_list = ['Python', 'Exercises', 'Free', 'Answer', 'Tutorials', 'Numpy']
Expected Answer:
0 Python
1 Exercises
2 Free
3 Answer
4 Tutorials
5 Numpy
9. Write a python program to establish all the possible permutations of a given list in the following output.
The output is:
list = [7, 8, 9]
Expected Answer:
[(7, 8, 9), (7, 9, 8), (8, 7, 9), (8, 9, 7), (9, 7, 8), (9, 8, 7)]
10. Write a python program to obtain the deviation between the list_a and list_b as given in the following output.
The output is:
list_a = [22, 52, 79, 55, 31, 90, 67, 54, 87]
list_b = [31, 52]
Expected Answer:
The deviation between the list_a and list_b are: [67, 79, 54, 55, 22, 87, 90]
11. Write a python program to join a list of fruits as provided in the following output with a symbol '-' in between fruits.
The output is:
fruits = ['Apple', 'Grapes', 'Berry', 'Mango']
Expected Answer:
All fruits are: Apple-Grapes-Berry-Mango
12. Write a python program to check whether all the numbers in the list a actually greater than certain number.
The output is:
list_a = [5,6,9,10,12,15]
number: 4 and 9
Expected Answer:
All numbers in the list greater than 4: True
All numbers in the list greater than 9: False
13. Write a python program randomly generate a list of eight odd numbers in the range of 1 to 50.
The output is:
Expected Answer:
[17, 21, 23, 45, 27, 35, 41, 31]
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)