
Monday, May 31, 2021
Sunday, May 30, 2021
Friday, May 28, 2021

Exercise 44
Write a Python algorithm as a function which takes as a parameter a list of integers L and which returns the list obtained from L by moving all zeros to the beginning of the list. Example if L = [7, 0, 11, 0, 25, 16, 0, 14], the algorithm returns the list: [0, 0, 0, 7, 11, 25, 16, 14]Solution
Thursday, May 27, 2021
Tuesday, May 25, 2021

Exercise 42
Write a Python algorithm as a function which takes as a parameter a list of integers L and which returns the list obtained from L by inserting just after each number the string 'even' or 'odd' depending on the parity of number. Example if L = [2, 11, 25, 6, 14], the algorithm returns the list: [2, 'even', 11, 'odd', 25, 'odd', 6, 'even', 14, 'even']Solution
Sunday, May 23, 2021
Saturday, May 22, 2021
Friday, May 21, 2021

Exercise 36
Write a Python algorithm as a function which takes as parameter a couple (listScores, listCoefficients) and which returns the average obtained, where listScores designates the list of scores obtained by a students and listCoefficients designates the list of associated coefficientsSolution

Exercise 35
Write a python algorithm as a function which takes as parameter a string text T and which returns the list of words containing at least one number and one capital letter. Example: if T = 'Python2.7 has been replaced by Python3.X since 2018', the algorithm return: ['Python2.7', 'Python3.X']Solution
Thursday, May 20, 2021
Wednesday, May 19, 2021

Exercise 31
For given a list of integers L, write a Python algorithm that returns the list of tuples (n, m) verifying n + m <10. Example: if L = [11, 3, 2, 22, 4, 31, 18, 6, 12, 1, 7], the algorithm returns: the list: [(3, 3), (2, 3), (4, 3), (6, 3), (1, 3), (3, 2), (2, 2), (4, 2), (6, 2), (1, 2), (7, 2), (3, 4), (2, 4), (4, 4), (1, 4), (3, 6), (2, 6), (1, 6), (3, 1), (2, 1), (4, 1), (6, 1), (1, 1), (7, 1), (2, 7), (1, 7)]Solution
Monday, May 17, 2021

Exercise 26
For a given list L of integers, write an algorithm in Python that return the tuple of lists (l_even, l_odd) where l_even designates the list of even integers of L and l_odd designates the list of odd integers of L. Example for L = [11, 3, 22, 14, 31, 18, 12, 7] the program returns the pair of lists: ([22, 14, 18, 12], [11, 3, 31, 7])Solution
Tuesday, May 11, 2021

Exercise 24
Write a Python algorithm as a function which takes as parameter a couple (L, a) formed by a list L and an element 'a' and which returns the position of the element 'a' in the list L without using the index() method or any other built-in Python method. The function should return -1 if element 'a' is not present in the list L.Solution
Friday, May 7, 2021
Thursday, May 6, 2021

Exercise 18
Write a Python program that determines the symmetric difference of two lists L1 and L2, i.e. the list made up of the elements of L1 which are not in L2 and the elements of L2 which are not in L1 Example if: L1 = [11, 3, 22, 7, 13, 23, 9] L2 = [5, 9, 19, 23, 22, 23, 13] The program returns the list [11, 3, 7, 5, 19]Solution
def symetricDifference(L1 , L2):
# initialiser la liste difference sysmétrique de L1 et L2
diffSym = []
for x in L1:
if x not in L2:
diffSym.append(x)
for x in L2:
if x not in L1:
diffSym.append(x)
return diffSym
#Example
L1 = [11 , 3 , 22 , 7 , 13 , 23 , 9]
L2 = [5 , 9 , 19 , 23 , 22 , 23 , 13]
print("The symetric difference of L1 and L2 is : " , symetricDifference(L1 , L2))
# The output is: The symetric difference of L1 and L2 is : [11, 3, 7, 5, 19]
Younes Derfoufi
my-courses.net
my-courses.net
Tuesday, May 4, 2021
Monday, May 3, 2021
Exercise 94*
Write a Python program as function that takes as parameter a string s and which returns the list repeated word within the string s. Example: if s = "Python is object oriented programming language. Python is also also used for data sciences", the fuction returns the list: ['Python', 'is', 'also']Solution
Subscribe to:
Posts (Atom)
Category Of Mobile Courses
Actualités
(644)
Adsense
(1)
Affiliation
(1)
Algebraic Topology
(2)
Algorithmic
(1)
all-news
(30)
Android
(5)
Android App
(8)
Android app without code
(4)
Android Apps
(256)
Android Development
(4)
Android download
(2)
Android OS
(3)
AngularJS
(1)
Automata theory and formal language
(5)
Bootstrap CSS
(1)
C programming
(5)
Category and Functor
(8)
CMS
(3)
Computer Glossary
(18)
Create Mobile App With Ionic Framework
(2)
CSS
(2)
CSS-Cascading-Style-Sheets
(4)
Developpement Java
(13)
Differential Geometry
(1)
Django-Python-Framework
(15)
dropshiping
(26)
Earn Money by Internet
(4)
Emplois
(23)
Framework php
(2)
Fraud
(2)
Github
(2)
HTML
(7)
IT News
(3)
Java For Beginners
(10)
Javascript
(12)
Kotlin Programming Language
(8)
Kotlin For Mobile Android
(1)
Linux Download
(2)
Marketing
(5)
Mobile
(3)
Mobile Courses
(4)
Mobile Marketing
(4)
MoneyGram
(1)
News
(721)
Node.js
(5)
Open Source
(1)
Photoshop
(1)
Protect Computer
(1)
Python
(36)
Python BeautifulSoup
(1)
Python For Data Science
(2)
Python PyQt
(13)
Python Reference
(1)
Python Source Code
(3)
Python-Books
(6)
Python-DVD-Training
(1)
Python-Exercises
(297)
Python-Framework
(1)
Python-IDE
(1)
Python-Kivy-Framework
(2)
Python-Modules
(1)
Python-pdf
(2)
Python-pyQt
(1)
python-temp
(3)
Référencement
(2)
Script PHP
(2)
Security
(6)
SEO
(1)
Snipping Tool: Faq
(1)
Social Networks
(1)
Source Code
(4)
Statistics With SPSS
(2)
Surveillance Software
(1)
Travail à domicile
(6)
Tutoriels php en vidéos
(2)
Tutoriels-MySql
(6)
tutoriels-php
(19)
Utilitaires
(1)
VPS
(1)
Web Hosting
(1)
Webcam
(1)
Webmarketing
(11)
Western Union
(1)
Windows 10
(1)
Windows 7
(4)
Windows 7 Faq
(2)
Windows 8
(1)
Windows Accessories
(1)
Windows Download
(8)
Windows Drivers
(1)
Windows Fonts
(1)
Windows Power Shell
(2)
Windows Registry
(2)
Windows Security
(18)
Windows Software
(2)
Windows Spyware
(2)
Windows utilities
(3)
Windows Virus
(2)
Windows Vista
(3)
Windows Wireless
(1)
Windows xp
(1)
Wordpress
(1)