Solution Exercise 41 - Rectangle class and inherited child Parallelepipede class
Exercise 41 Write a Rectangle class in Python language, allowing you to build a rectangle with length and width attributes. Create a Perimeter() method to calculate the perimeter of the…
Exercises with solutions on OOP - object oriented programming in Python
Exercise 41. Rectangle class: || Solution Write a Rectangle class in Python language, allowing you to build a rectangle with length and width attributes. Create a Perimeter() method to calculate…
Solution Exercise 40: Python program to swap the first and the last word in a string
Exercise 40 Write a Python program that allows you to swap the first and the last word. Example if s = "Python is a programming language", the program returns the…
Solution Exercice 39 : the number of words in python string
Exercice 39 Write a Python program that counts the number of words on a string Solution def countWord(s): # convert the string s to a list L = s.split() #…
The Python NumPy Library
1. About numpy 1.1 What is numpy ? Numpy is an open source library associated with the Python language, created specially for scientific computing, notably matrix computing, while providing multiple…
Python Matplotlib module
1. About matplotlib module The matplotlib module is a large and very complete module. Here we are going to look at some examples of use such as for example the…
Solution Exercise 38: algorithm python to find the longest word
Exercise 38 Write a Python program to find the longest word on a string. Solution: def longestWord(s): # Converting the string s to a list L = s.split() # define…