Solution Exercise 83: python algorithm which replaces even index elements by 2
Exercise 83 Write a python algorithm which replaces the elements of even index by 2 and the elements of odd index by 1. Solution Solution # function which replaces the…
Python Courses & Exercises with solutions !
Exercise 83 Write a python algorithm which replaces the elements of even index by 2 and the elements of odd index by 1. Solution Solution # function which replaces the…
Exercise 82 Write a program in Python which determines the list of words containing two successive identical characters in a character string s. Example if s = "Python is the…
Exercise 79 Write using the count() method, a python algorithm as a function which takes as parameter a list of integers L and which returns without repetitions the list of…
Exercise 78 Given a list made up of the students' averages avg_list, write a python algorithm that determines the first index of the average which is less than 10. Example…
Exercise 77 Repeat the previous exercise (Exercise 76) without using the max() method. Solution def maxList (L): # initialization of the index of the maximum of the list i =…
Exercise 75 Write a Python algorithm to reverse a list without using the reverse() method Solution def reverseList (L): # initialization of the reversed list reverseL = [] for i…
Exercise 74 Write a Python algorithm that asks the user to enter successively 7 integers and display the list of numbers entered by ignoring repeated numbers. Example if the user…